This repository contains the source code for "A Coupled Flow Approach to Imitation Learning": https://arxiv.org/abs/2305.00303.
Accepted at the International Conference on Machine Learning (ICML) 2023.
This work is together with Elad Sarafian and Sarit Kraus.
A full description for reproducing our exact environment:
note, a few lines may seem superfluous, but this will help avoid mujoco-py errors.
- Download mujoco200 http://www.roboti.us/download.html
- wget https://www.roboti.us/download/mujoco200_linux.zip
- mkdir ~/.mujoco
- unzip mujoco200_linux.zip -d ~/.mujoco;
- add mjkey.txt to the ~/.mujoco
- A free universal key is now available here: http://www.roboti.us/license.html (until october 18 2031)
- add path in .bashrc
- conda create -n cfil python=3.7.6
- conda activate cfil
- pip install gym==0.15.7
- I had errors simply pip installing mujoco-py
- What worked instead was:
- git clone https://github.com/openai/mujoco-py 2. cd mujoco-py 3. pip install -r requirements.txt 4. pip install -r requirements.dev.txt 5. pip install mujoco-py==2.0.2.8
- mujoco_py is often the main cause for issues so do an intermediate test:
- cd ..
- cd out of mujoco-py folder, otherwise test won't import correct mujoco-py of 2.0.2.8
- python
- import mujoco_py
- Should not err!
- cd ..
- conda install openmpi-mpicc
- cd CFIL/spinningup
- pip install -e .
- conda install -c conda-forge mpi4py
- pip install protobuf==3.20.0
- pip install --upgrade numpy
- Ignore the requirements error.
- DONE!
- Now you may run the bash scripts. Note, they currently assume a cluster of 4 gpu's.
- For plotting the results use the jupyter notebook
- First
- conda install -c anaconda jupyter
- First
Some of the code above is from the following repositories:
- spinningup: We use their implementation of SAC.
- normalizing_flows: We use their implementation of MAF.