File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ def train(
162
162
) -> str :
163
163
import yaml
164
164
165
+ actual_walltime = int (0.9 * walltime ) # reserve 10 % for safe shutdown
165
166
mace_config ["train_file" ] = inputs [1 ].filepath
166
167
mace_config ["valid_file" ] = inputs [2 ].filepath
167
168
config_str = yaml .dump (dict (mace_config ))
@@ -172,7 +173,7 @@ def train(
172
173
command_tmp ,
173
174
command_cd ,
174
175
command_write ,
175
- "timeout -s 15 {}s psiflow-train-mace" .format (max ( walltime - 15 , 0 ) ),
176
+ "timeout -s 15 {}s psiflow-train-mace" .format (actual_walltime ),
176
177
"--config config.yaml" ,
177
178
"--model {} || true;" .format (inputs [0 ].filepath ),
178
179
"ls *;" ,
Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ def train(
249
249
) -> str :
250
250
import yaml
251
251
252
+ actual_walltime = int (0.9 * walltime ) # reserve 10 % for safe shutdown
252
253
nequip_config ["dataset_file_name" ] = inputs [1 ].filepath
253
254
nequip_config ["validation_dataset" ] = "ase"
254
255
nequip_config ["validation_dataset_file_name" ] = inputs [2 ].filepath
@@ -262,7 +263,7 @@ def train(
262
263
command_cd ,
263
264
command_env ,
264
265
command_write ,
265
- "timeout -s 15 {}s" .format (max ( walltime - 15 , 0 ) ), # 15 s slack
266
+ "timeout -s 15 {}s" .format (actual_walltime ), # 15 s slack
266
267
"psiflow-train-nequip" ,
267
268
"--config config.yaml" ,
268
269
"--model {} || true;" .format (inputs [0 ].filepath ),
You can’t perform that action at this time.
0 commit comments