- clone the repo:
git clone https://github.com/suruchi1997/ControlledVAE.git
- setup the anaconda environment:
cuda:conda env create --file env_cuda.yml
cpu:conda env create --file env_cpu.yml
Regenerating model results for each experiment is divided into a few steps:
- Training M baseline models. Since the baseline model may be sensitive to weight initialization, we provide a
--rs option to set the random seed. A few good seeds are available in
rseeds.txt
. - Training N models within a range of beta values based on each baseline model. Beta values
have to be consistent across all seeds. We provide a range of beta values in
betas.txt
. - Evaluating all trained models.
- Making plots.
Both Pendulum and Cartpole follow the similar steps for training and evaluating the models:
train.py
The base models and controllability-constrained models are trained and saved in the models/ folder.
- (option A) Slower, in sequence training:
usepython train.py
to train all models in sequence. Will userseeds.txt
to train M base models, andbetas.txt
to train N models for each rseed. - (option B) Parallelized training:
- Train M base models + beta=0 in parallel
python train.py --rs {integer} --beta 0.0
Slurm script for training all base models:sbatch train_parallel_base.sh
- Train N models for each remaining beta value, using
python train.py --rs {integer} --beta {float}
Slurm script for training the rest of the models:sbatch train_parallel_ctrl.sh
- Train M base models + beta=0 in parallel
- (option C) Run B.ii in parallel for all rseed-beta combinations if the overhead of re-learning the base model is not a concern.
- Then
python eval.py
is used to execute the evaluation process. Same options as for training.
slurm script for evaluation:sbatch eval_parallel.sh
cd <experiment>
python ../csv_com.py
- generate csv files based on evaluation results.python ../plots.py
- generate the "Control Cost Change in %" vs "Degree of Controllability" plot.
NVIDIA P-100 GPUs
NVIDIA A100-PCIE-40GB - to speed up the training process for complex system
https://drive.google.com/drive/u/0/folders/1piegH2gSNOG6WZtlOgSI3MLtDAUxj7ng
Above is the link to datasets in order to regenerate the results in paper. The model can be data set oriented and has a lot of scope for improvement