-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharg_utils.py
98 lines (93 loc) · 3.13 KB
/
arg_utils.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import argparse
"""
Util to compile command line arguments for core script to run experiments
for the IFL Benchmark (main.py)
"""
def get_parser():
# Global Parameters
parser = argparse.ArgumentParser(
fromfile_prefix_chars="@", description="IFL Benchmark Arguments"
)
parser.add_argument(
"--env_name",
default="Humanoid",
help="Choice of environment. Choices: [Humanoid, Anymal, AllegroHand]",
)
parser.add_argument("--logdir", default="logs", help="log directory")
parser.add_argument("--logdir_suffix", default="", help="log directory suffix")
parser.add_argument("--cuda", action="store_true", help="run on CUDA")
parser.add_argument("--cnn", action="store_true", help="visual observations")
parser.add_argument(
"--seed", type=int, default=123456, help="random seed (default: 123456)"
)
# Parallel experiment
parser.add_argument(
"--agent",
type=str,
default="IL",
help="Type of parallel agent; options are in iflb/agents/__init__.py",
)
parser.add_argument(
"--supervisor",
type=str,
default="GymRL",
help="Type of parallel supervisor; options are in iflb/supervisors/__init__.py",
)
parser.add_argument(
"--allocation",
type=str,
default="CUR",
help="Type of allocation strategy; options are in iflb/allocations/__init__.py",
)
parser.add_argument("--num_envs", type=int, default=10, help="number of robots")
parser.add_argument("--num_humans", type=int, default=1, help="number of humans")
parser.add_argument(
"--min_int_time", type=int, default=1, help="minimum intervention time"
)
parser.add_argument(
"--hard_reset_time",
type=int,
default=0,
help="number of steps waited before reset completes",
)
parser.add_argument(
"--human_hard_reset_time",
type=int,
default=0,
help="number of steps for each human to wait after unsuccessful allocation",
)
parser.add_argument("--log_freq", type=int, default=100, help="log frequency")
parser.add_argument(
"--vec_env",
action="store_true",
help="whether or not to use vectorized Isaac Gym environments",
)
parser.add_argument(
"--render",
action="store_true",
help="whether or not to render an Isaac Gym env",
)
parser.add_argument(
"--resume",
default="",
help="if resuming a previous run, this is the logdir from which to load info",
)
parser.add_argument(
"--num_steps",
type=int,
default=10000,
help="maximum number of parallel timesteps (default: 10000)",
)
parser.add_argument(
"--noise",
type=float,
default=0.0,
help="standard deviation for independent zero-mean gaussian noise injection into actions",
)
parser.add_argument(
"--discrete", action="store_true", help="if true, use a discrete action space"
)
parser.add_argument(
"--network", type=str, default="base", help="network architecture"
)
return parser