-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_runner.py
37 lines (26 loc) · 955 Bytes
/
test_runner.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
import os
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Test Runner CLI')
parser.add_argument(
"--logdir",
type=str,
default="",
required=True,
help="Log directory directory"
)
parser.add_argument(
"--configdir",
type=str,
default="",
required=True,
help="Path to config directory"
)
args = parser.parse_args()
print("Initializing Test Runner")
os.makedirs(args.logdir, exist_ok=True)
for config in os.listdir(args.configdir):
print("Running Test with config", config)
log_subdir = config[:-7]
os.system("python3 sim.py --config " + os.path.join(args.configdir, config) + " --logdir " + os.path.join(args.logdir,log_subdir) + " --days_per_config 1")
os.system("python3 plot_gen.py --data " + os.path.join(args.logdir, log_subdir, "sim-summary.pickle"))