forked from andrew-j-levy/Hierarchical-Actor-Critc-HAC-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.py
61 lines (45 loc) · 1.44 KB
/
options.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
import argparse
"""
Below are training options user can specify in command line.
Options Include:
1. Retrain boolean
- If included, actor and critic neural network parameters are reset
2. Testing boolean
- If included, agent only uses greedy policy without noise. No changes are made to policy and neural networks.
- If not included, periods of training are by default interleaved with periods of testing to evaluate progress.
3. Show boolean
- If included, training will be visualized
4. Train Only boolean
- If included, agent will be solely in training mode and will not interleave periods of training and testing
5. Verbosity boolean
- If included, summary of each transition will be printed
"""
def parse_options():
parser = argparse.ArgumentParser()
parser.add_argument(
'--retrain',
action='store_true',
help='Include to reset policy'
)
parser.add_argument(
'--test',
action='store_true',
help='Include to fix current policy'
)
parser.add_argument(
'--show',
action='store_true',
help='Include to visualize training'
)
parser.add_argument(
'--train_only',
action='store_true',
help='Include to use training mode only'
)
parser.add_argument(
'--verbose',
action='store_true',
help='Print summary of each transition'
)
FLAGS, unparsed = parser.parse_known_args()
return FLAGS