-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathargs.py
More file actions
28 lines (22 loc) · 766 Bytes
/
args.py
File metadata and controls
28 lines (22 loc) · 766 Bytes
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
"""Contains settings that vary per run.
All global, immutable settings should be in settings.py.
"""
import argparse
def parse_args():
"""Defines command line arguments.
"""
parser = argparse.ArgumentParser()
parser.add_argument("--env", required=True, type=str)
parser.add_argument("--collect_data", required=True, type=int)
parser.add_argument("--start_seed", required=True, type=int)
parser.add_argument("--num_seeds", required=True, type=int)
args = parser.parse_args()
print_config(args)
return args
def print_config(args):
"""Print all info for this experiment.
"""
end = args.start_seed+args.num_seeds
print(f"Seeds: {list(range(args.start_seed, end))}")
print(f"Env: {args.env}")
print()