Giter Club home page Giter Club logo

bi-level-optim's Introduction

Bi-level-optim

Preface

This code was executed in a virtual python environment using Python 3.9. This Code belongs to the AutoML Conf 2024 Paper titeled "Bi-Level One-Shot Architecture Search for Probabilistic Time Series Forecasting". This Code contains everything necessary to run experiments on the "Exchange" as well as "Power" dataset referenced in the paper. To obtain the other dataset follow these steps:
M4


All preprocessing steps and datasplits are automaticly conducted internally and identical to the procedure used for the paper
Store the .csv files (in case of M4) or a .pkl file of the data (in case of Solar, and Wiki) at the following places:
  • Bi-level-optim/ArchSearch/darts/res/
  • Bi-level-optim/ArchSearch/res/
  • Bi-level-optim/PWN/res/

Call the corresponding folders either "M4", "solar_data", or "wiki_data"

Running the architecture search

To run the architecture search use the train_search.py file in Bi-level-optim/ArchSearch/darts/
The standard experiment to run is a macro-architecture search for "Exchange".
If you like to run a different experiment setup use the options stated in lines 126 to 141.
Please set only one dataset flag to true at a time.

cd Bi-level-optim/ArchSearch/darts/
python train_search.py

Training PWN

To train PWN, either standard or with an optimized architecture use the training.py file in Bi-level-optim/PWN/
The standard experiment to run is the training of an optimized architecture for "Exchange".

cd Bi-level-optim/PWN/
python training.py

In line 26 and 58 you can choose wether or not to use an optimized architecture
If you want to run an experiment with the larger vanilla model mentioned in the paper set the
aforementioned options to False and set config.rnn_layer_config.n_layers in line 37 to 12.
To other experiments different experiments define your own at line 105 to 114 (multiple at oncee possible).
Possible selection options are:

  • ReadX -> Choose the appropiate read function for your dataset
  • PWN or PWNEM -> PWN uses CWSPN and PWNEM uses WEin as the PC
  • config_c -> Replace with config_w if you use PWNEM
  • context_timespan, prediction_timespan, timespan_step -> replace according to dataset
  • use_transformer -> choose wether to use STrans
  • smape_target -> Set to true if SMAPE is your metric (only for M4)
    Important Notes:
  • batchsize and #epochs can be changed in line 152
  • comment out all instances of config.window_size and config.fft_compression except for the one related to your dataset (line 80 to 99)

To use a new micro architecture for the SRNN and CWSPN copy the results of the architecture search (the arch. weight arrays) to pwn.py in
Bi-level-optim/PWN/model/ in line 21 (SRNN) or line 25 (CWSPN). If you use PWNEM you can do the same for a searched SRNN arch in file pwn_em.py
in the same folder.

bi-level-optim's People

Contributors

skraband avatar

Watchers

 avatar

Forkers

j0nasseng

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.