forked from behavioral-data/Homekit2020
-
Notifications
You must be signed in to change notification settings - Fork 0
/
batcher.py
31 lines (26 loc) · 783 Bytes
/
batcher.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
import subprocess
# import time
# import datetime
# hours = 1
# for i in range(hours * 60):
# time.sleep(60)
# print(i, datetime.datetime.now())
# print("Done")
task_name = "Fatigue"
pretrains = None
# task_name = "Fatigue"
# pretrains = [
# "test_model.ckpt",
# "test_model.ckpt",
# "test_model.ckpt",
# ]
for i in range(3):
seed = 2494 + i
if pretrains is not None:
extra = f"--model.pretrained_ckpt_path {pretrains[i]}"
else:
extra = ""
c = f"python src/models/train.py fit -c configs/models/MyCNNtoTransformerClassifier.yaml -c configs/tasks/{task_name}.yaml -c configs/data_temporal_7_day.yaml -c configs/common.yaml --pl_seed {seed} {extra}"
print(c)
result = subprocess.run(c) # , shell=True
print(result)