-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathrun_experiment.py
executable file
·42 lines (34 loc) · 1.24 KB
/
run_experiment.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
import subprocess
datasets = ['fsai', 'synthetic', 'statics', 'assist2009', 'assist2015']
memory_sizes = [1, 2, 5, 10, 20, 50, 100]
state_dims = [10, 50, 100, 200]
model_profiles = []
for dataset in datasets:
for memory_size in memory_sizes:
for state_dim in state_dims:
model_profiles.append(
{
'dataset': dataset,
'memory_size': memory_size,
'value_memory_state_dim': state_dim,
'key_memory_state_dim': state_dim
}
)
for model_profile in model_profiles:
# base
command = ["python", "main.py"]
# add dataset
command.append("--dataset")
command.append("{}".format(model_profile['dataset']))
# add memory_size
command.append("--memory_size")
command.append("{}".format(model_profile['memory_size']))
# add value_memory_state_dim
command.append("--value_memory_state_dim")
command.append("{}".format(model_profile['value_memory_state_dim']))
# add memokey_memory_state_dimry_size
command.append("--key_memory_state_dim")
command.append("{}".format(model_profile['key_memory_state_dim']))
# run command
print("run:", command)
subprocess.run(command)