forked from meppe/Scilab-rl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_smoke_tests.sh
executable file
·58 lines (52 loc) · 1.58 KB
/
run_smoke_tests.sh
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
50
51
52
53
54
55
56
57
58
#!/usr/bin/env bash
# We first test all the algorithms and then test a selection of environments
test_algos() {
# test all algorithms that have a config in conf/algorithm.
# For now, we only consider algorithms with a continuous action space, so DQN will not work.
ALGOS=""
for config in "conf/algorithm"/*
do
config="${config%.*}"
ALGOS+="${config##*/},"
done
ALGOS="${ALGOS%,*}"
echo "Smoke-testing algorithms $ALGOS"
# environments with which to test the algorithms
local ENVS="FetchReach-v1,AntReacher-v1,reach_target-state-v0,parking-limited-v0"
# Don't have xvfb? install it with sudo apt-get install xvfb
if ! xvfb-run -a python3 main.py env=$ENVS algorithm=$ALGOS +performance=smoke_test --multirun;
then
exit 1
fi
}
test_envs() {
local ENVS=""
#MuJoCo
# ENVS+="FetchReach-v1,"
ENVS+="FetchPickAndPlace-v1,"
ENVS+="HandManipulateBlock-v0,"
ENVS+="Hook-o1-v1,"
ENVS+="ButtonUnlock-o2-v1,"
# ENVS+="AntReacher-v1,"
ENVS+="AntMaze-v0,"
ENVs+="AntButtonUnlock-o2-v1,"
ENVS+="Blocks-o0-gripper_random-v1,"
ENVS+="Blocks-o3-gripper_none-v1,"
ENVS+="Reach1DOF-v0,"
#RLBench
# ENVS+="reach_target-state-v0,"
ENVS+="close_box-state-v0,"
ENVS+="CopReach-ik1-v0,"
# ADD NEW ENVIRONMENTS HERE
ENVS+="parking-limited-v0"
echo "Smoke-testing environments $ENVS"
# Don't have xvfb? install it with sudo apt-get install xvfb
if ! xvfb-run -a python3 main.py algorithm=sac env=$ENVS +performance=smoke_test --multirun;
then
exit 1
fi
}
export CUDA_VISIBLE_DEVICES=""
test_algos
test_envs
echo "All smoke tests passed successfully."