forked from petecheng/Time2Graph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript_run.py
36 lines (34 loc) · 967 Bytes
/
script_run.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
import os
import concurrent.futures
# 定義一個函數來運行命令
params_dict = {
'K': 20,
'C': 50,
'n_splits': 5,
'num_segment': 3,
'seg_length': 5,
'opt_metric': 'recall',
'embed': 'aggregate',
'embed_size': 64,
'warp': 2,
'kernel': 'dts',
'percentile': 10,
'batch_size': 50,
'scaled': '',
'cache':'',
}
def run_command(cmds,i):
# os.system('python scripts/TEPCO_run.py --seg_length 5 --num_segment 3 --kernel dts --behav {} --embed_size 64'.format(i))
os.system('python scripts/TEPCO_run.py {} --behav {}'.format(cmds,i))
assign={'sleep':1,'out':2,'meal':3,'other':4}
for i in assign.keys():
for j in range(1,11):
cmds = []
params_dict['K']=10*j
params_dict['C']=20*j
for para_n,para_v in params_dict.items():
cmds.append('--'+para_n)
cmds.append(str(para_v))
cmd = ' '.join(cmds)
run_command(cmd,i)
# print(cmd)