-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrand_baseline_eval.py
47 lines (36 loc) · 1.35 KB
/
rand_baseline_eval.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
from GA import baseline_random
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parse_args = "pop_size,n_generations," \
"n_agents,n_timesteps,n_cores," \
"cluster_node,run_notes,run_name," \
"wandb_mode,log_interval,save_interval," \
"log_folder_path,log_name"
parse_args = parse_args.split(",")
for parse_arg in parse_args:
parser.add_argument(parse_arg)
args = parser.parse_args()
pop_size = int(args.pop_size)
n_generations = int(args.n_generations)
n_agents = int(args.n_agents)
n_timesteps = int(args.n_timesteps)
n_cores = int(args.n_cores)
run_notes = args.run_notes
run_name = args.run_name
cluster_node = args.cluster_node
wandb_mode = args.wandb_mode
log_interval = int(args.log_interval)
save_interval = int(args.save_interval)
log_name = args.log_name
log_folder_path = args.log_folder_path
if wandb_mode != "disabled":
using_wandb = True
else:
using_wandb = False
baseline_random.train(pop_size, n_generations, n_agents,
n_timesteps, n_cores,
using_wandb, wandb_mode, log_interval, save_interval,
log_folder_path, log_name,
cluster_node,
run_notes, run_name, ["random"])