-
Notifications
You must be signed in to change notification settings - Fork 0
/
seed_exp_time.py
45 lines (37 loc) · 1.46 KB
/
seed_exp_time.py
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
import argparse
import os
# model_type = "koopman"
# model_type = "rnn"
model_type = "reflex"
# env_name = "pendulum"
env_name = "cartpole"
T = 10
# T = 20
parser = argparse.ArgumentParser(prog="Main runner", description="Run experiments from command line")
parser.add_argument("-t", "--horizon", default=10, type=int)
parser.add_argument("-mt", "--model_type", default="koopman")
parser.add_argument("-en", "--env_name", default="pendulum") # pendulum or cartpole
parser.add_argument("-ub", "--upper_bound", default=2.0, type=float)
parser.add_argument("-lb", "--lower_bound", default=-2.0, type=float)
parser.add_argument("-ubt", "--upper_bound_test", default=1.0, type=float)
parser.add_argument("-lbt", "--lower_bound_test", default=-1.0, type=float)
args = parser.parse_args()
model_type = args.model_type
# model_type = "koopman"
# model_type = "rnn"
# model_type = "reflex"
env_name = args.env_name
# env_name = "pendulum"
# env_name = "cartpole"
T = args.horizon
i = 0
print("================== BEGIN {} EXPERIMENT SEED={} ==================".format(model_type, i))
os.system("python timer.py --seed {} --model_type {} --env_name {} --horizon {} --upper_bound {} --lower_bound {} --upper_bound_test {} --lower_bound_test {}".format(
i,
model_type,
env_name,
T,
args.upper_bound,
args.lower_bound,
args.upper_bound_test,
args.lower_bound_test))