-
Notifications
You must be signed in to change notification settings - Fork 1
/
arguments.py
29 lines (22 loc) · 1.11 KB
/
arguments.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
import argparse
def get_args():
parser = argparse.ArgumentParser(description='RL')
# environment
parser.add_argument('--env-name', default='FetchReach-v1', help='gym environment')
parser.add_argument('--render', action='store_true')
parser.add_argument('--relative-goal', action='store_true')
# training
parser.add_argument('--seed', type=int, default=0)
parser.add_argument('--num-processes', type=int, default=2)
parser.add_argument('--n-epochs', type=int, default=50)
parser.add_argument('--n-cycles', type=int, default=10)
parser.add_argument('--n-batches', type=int, default=40)
parser.add_argument('--actor-lr', default=1e-3, type=float)
parser.add_argument('--critic-lr', default=1e-3, type=float)
# logging
parser.add_argument('--logid', default=None, type=int, help='unique id for each run (default: date_time)')
parser.add_argument('--save-every', default=5, type=int, help='save policy after every ... epochs')
# Miscellaneous
parser.add_argument('--test', action='store_true')
args = parser.parse_args()
return args