Public implementation of SPLT Transformer and code needed to run evaluations in our Toy Car environment, our Modified NoCrash environment, and D4RL.
All python dependencies are in environment.yml
. Install with:
conda env create -f environment.yml
conda activate splt_transformer
Install CARLA v0.9.11 (https://carla.org/2020/12/22/release-0.9.11/) for which the binaries are available here: (https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_0.9.11.tar.gz)
mkdir $HOME/carla911
cd $HOME/carla911
wget "https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_0.9.11.tar.gz"
tar xvzf CARLA_0.9.11.tar.gz
Add the following to your .bashrc
:
export CARLA_9_11_PATH=$HOME/carla911
export CARLA_9_11_PYTHONPATH=$CARLA_9_11_PATH/PythonAPI/carla/dist/carla-0.9.11-py3.7-linux-x86_64.egg
In order to run the D4RL experiments, you will need to install mujoco. Please refer to mujoco_py for details.
python scripts/splt/bt/toycar_train.py --device cuda:0 --exp_name name
python scripts/splt/bt/toycar_plan.py --device cuda:0 --gpt_loadpath name
python scripts/splt/bt/nocrash_train.py --device cuda:0 --exp_name name
python scripts/splt/bt/nocrash_plan.py --device cuda:0 --gpt_loadpath name
python scripts/splt/bt/d4rl_train.py --dataset halfcheetah-medium-expert-v2 \
--device cuda:0 --exp_name name
python scripts/splt/bt/d4rl_plan.py --dataset halfcheetah-medium-expert-v2 \
--device cuda:0 --gpt_loadpath name
Heavily based off of Trajectory Transformer TT repo.
IQL implementation based off of rlkit repo.
DT implementation based off of Decision Transformer DT repo.
Testing environments are based on the CARLA NoCrash benchmark and D4RL.