forked from mila-iqia/babyai
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
49 lines (37 loc) · 2.41 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
language: python
cache: pip
python:
- "3.6"
before_install:
- pip3 install --upgrade pip
# command to install dependencies
install:
- pip3 install torch==1.5.1+cpu torchvision==0.6.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
- pip3 install flake8
- pip3 install scikit-build
- pip3 install --editable .
# command to run tests
script:
# Check the source code for obvious errors
- python3 -m flake8 . --count --show-source --statistics --select=E901,E999,F821,F822,F823
# Test the BabyAI levels
- ./run_tests.py
# Quickly exercise the RL training code
- time python3 -m scripts.train_rl --env BabyAI-GoToObj-v0 --algo ppo --procs 4 --batch-size 80 --log-interval 1 --save-interval 2 --val-episodes 10 --frames 300 --arch original --instr-dim 16 --image-dim 16 --memory-dim 16
# Check that the bot works on a few episodes of Boss Level
- python3 -m scripts.eval_bot --level BossLevel --num_runs 50
- python3 -m scripts.eval_bot --level BossLevel --num_runs 50 --advise_mode --non_optimal_steps 100 --bad_action_proba .3
# Check that the bot works on a single episode from each level
- python3 -m scripts.eval_bot --num_runs 1
# Quickly test the generation of bot demos
- python3 -m scripts.make_agent_demos --env BabyAI-GoToRedBallGrey-v0 --episodes 100 --valid-episodes 32
# Quickly test the evaluation of bot demos
- python3 -m scripts.evaluate --env BabyAI-GoToRedBallGrey-v0 --demos BabyAI-GoToRedBallGrey-v0_agent
# Quick test for imitation learning
- python3 -m scripts.train_il --env BabyAI-GoToRedBallGrey-v0 --demos BabyAI-GoToRedBallGrey-v0_agent --model GoToRedBallGrey-il --val-interval 1 --patience 0 --episodes 100 --val-episodes 50
# Quickly test the evaluation of models
- python3 -m scripts.evaluate --env BabyAI-GoToRedBallGrey-v0 --model GoToRedBallGrey-il
# Quick test for imitation learning with multi env
- python3 -m scripts.train_il --multi-env BabyAI-GoToRedBall-v0 BabyAI-GoToRedBallGrey-v0 --multi-demos BabyAI-GoToRedBallGrey-v0_agent BabyAI-GoToRedBallGrey-v0_agent --val-interval 1 --patience 0 --multi-episodes 100 100 --val-episodes 50
# Quick test for train_intelligent_expert
- python3 -m scripts.train_intelligent_expert --env BabyAI-GoToRedBallGrey-v0 --demos BabyAI-GoToRedBallGrey-v0_agent --val-interval 1 --patience 0 --val-episodes 50 --start-demos 10 --num-eval-demos 5 --phases 2