All experiments are configured using hydra and monitored using Weights & Biases.
All experiments use the base hydra config in ./configs/main.yaml but override it differently. The overrides can be seen in ./configs/experiment. An experiment's config can be viewed with:
python train.py +experiment=INSERT_EXPERIMENT_NAME --cfg job
where INSERT_EXPERIMENT_NAME
is the filename of an experiment's yaml
config in ./configs/experiment.
The base config can be displayed with:
python train.py --cfg=job
The experiments are as follows:
An individual experiment can be run with:
python train.py +experiment=INSERT_EXPERIMENT_NAME
All experiments can be run with:
python train.py --multirun '+experiment=glob(*)'
or
python train.py --multirun +experiment=greedy_no_constraint,greedy_with_constraint,moderl,aleatoric_unc_ablation,myopic_ablation
python train.py --multirun +experiment=constraint_schedule ++training.random_seed=1,42,69,100,50
python train.py --multirun +experiment=compare_constraint_levels ++training.random_seed=1,42,69,100,50
Recreate the figures in the paper with:
python plot/plot_all_figures.py --wandb_dir=wandb --saved_runs=saved_runs.yaml
This uses the experiments stored in saved_runs.yaml, which can be reproduced as follows:
- Figure 1
python train.py +experiment=moderl
- Figure 2
python train.py +experiment=constraint_schedule
- Figure 3 - greedy plots (left)
python train.py --multirun +experiment=greedy_no_constraint,greedy_with_constraint
- Figure 3 - myopic ablation plots (right)
python train.py --multirun +experiment=myopic_ablation
- Figure 5
python train.py --multirun +experiment=aleatoric_unc_ablation
- Figures 6 & 7
python train.py --multirun +experiment=compare_constraint_levels ++training.random_seed=1,42,69,100,50 python train.py --multirun +experiment=constraint_schedule ++training.random_seed=1,42,69,100,50
Clone the repo with:
git clone https://github.com/aidanscannell/ModeRL.git ~/python-projects/moderl
Create a virtual environment:
ml python/3.8.7
ml py-virtualenv
python -m venv .venv
Install dependencies with:
cd /path/to/project/
source .venv/bin/activate
pip install -e ".[experiments]"
Run multiple experiments in parallel whilst using hydra's sweep:
python train.py --multirun +experiments=moderl ++training.random_seed=42,1,69,22,4
Copy wandb results from triton with:
rsync -avz -e "ssh" [email protected]:/home/scannea1/python-projects/moderl/experiments/wandb ./wandb