This project aims to provide clean implementations of imitation learning algorithms. Currently we have implementations of AIRL and GAIL, and intend to add more in the future.
To install:
sudo apt install libopenmpi-dev
conda create -n imitation python=3.7 # py3.6 is also okay.
conda activate imitation
pip install -r requirements.txt -r requirements-dev.txt
pip install -e . # install `imitation` in developer mode
To run:
# train demos with normal AIRL
python -m imitation.scripts.data_collect --gin_config configs/cartpole_data_collect.gin
# do AIRL magic to get back reward from demos
python -m imitation.scripts.train --gin_config configs/cartpole_orig_airl_repro.gin
- Follow the Google Python Style Guide. Examples of Google-style docstrings can be found here.
- Add units tests covering any new features, or bugs that are being fixed.
- PEP8 guidelines with line width 80 and 2-space indents are enforced by
ci/lint.sh
, which is automatically run by Travis CI. - Static type checking via
pytype
is automatically run inci/type_check.sh
. - Code coverage is automatically enforced by CodeCov.
The exact coverage required by CodeCov depends on the previous
code coverage %. Files in
imitation/{examples,scripts}/
have no coverage requirements.