Baseline algorithms for the safe-adaptation-gym
benchmark.
- Open a new terminal and
git clone
the repo. - Create a new environment with your favorite environment manager (venv, conda). Make sure to have it set up with
python >= 3.8.13
. - Install dependencies with
cd safe-adaptation-agents && pip install .
.
Let's reporduce the experiments for the benchmark.
The following command runs the on-policy algorithms:
python scripts/adaptation_experiment.py --configs defaults multitask on_policy" --agent <insert agent> --seed <insert seed>
where
Similarly, to run the model-based algorithms:
python scripts/adaptation_experiment.py --configs defaults multitask model_based" --agent <insert agent> --seed <insert seed>
where $\texttt{agent} \in \lbrace
To run an agent on a specific task:
python scripts/no_adaptation_experiment.py --configs defaults no_adaptation" --agent <insert agent> --task <insert task>
where $\texttt{task} \in \lbracecpo
as our agent.
More generally, every parameter in the configs.yaml
file can be easily changed when running either scripts/no_adaptation_experiment.py
or scripts/adaptation_experiment.py
by appending --parameter
when running the script.
We provide the results for our experiments and a jupyter-notebook that summarizes them in the benchmark
folder.