This is codebase for paper Policy Contrastive Imitation Learning. This codebase is build upon ROT .
In this repo, we provide intro to
- get start
- download expert demo
- train agents
-
Installing the following libraries
apt install libosmesa6-dev libgl1-mesa-glx libglfw3 -
installing conda environments
conda env create -f conda_env.yml cd <root_to_pcil_codebase> conda activate pcil
Download expert demonstrations, weights and environment libraries [link] The link contains the following:
- The expert demonstrations for all tasks in the paper.
- The weight files for the expert (DrQ-v2) and behavior cloning (BC).
- The supporting libraries for environments (Gym-Robotics, metaworld) in the paper.
- Extract the files provided in the link
- set the
path/to/dirportion of theroot_dirpath variable incfgs/config.yamlto the path of thePCILrepository. - place the
expert_demosandweightsfolders in${root_dir}/PCIL.
- set the
We use online logger [WANDB]:(https://wandb.ai), you can customize your own logger in logger.py.
We provide an example script:
python train.py agent=pc suite=dmc device_id=0 obs_type=features suite/dmc_task=hopper_stand num_demos=10
You can customize more parameters in config files in ./cfgs