Skip to content

Commit 52e5650

Browse files
authored
AWS: add a cmd to find error in _training_successful (#591)
1 parent a924439 commit 52e5650

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

doc/whats_new/v0.11.rst

+1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Changelog
1010
`ramp-database`
1111
...............
1212

13+
- AWS runner: better detection of training errors :pr:`591`
1314
- Switch to fetching starting kit repos via HTTP rather than using git clone to avoid being blocked by Github :pr:`592`.

ramp-engine/ramp_engine/aws/api.py

+5
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,11 @@ def _training_successful(config, instance_id, submission_name, actual_nb_folds=N
834834

835835
cmd = "find {}|egrep 'fold.*/y_pred_test.npz'|wc -l".format(folder)
836836
nb_test_files = int(_run(config, instance_id, cmd, return_output=True))
837+
838+
cmd = f"find {folder}|egrep 'fold.*/error.txt'|wc -l"
839+
n_error = int(_run(config, instance_id, cmd, return_output=True))
840+
if n_error > 0:
841+
return False
837842
if actual_nb_folds is not None:
838843
return nb_folds == nb_train_files == nb_test_files == actual_nb_folds
839844
else:

0 commit comments

Comments
 (0)