Skip to content

Commit

Permalink
AWS: add a cmd to find error in _training_successful (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
frcaud authored Mar 1, 2024
1 parent a924439 commit 52e5650
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/whats_new/v0.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Changelog
`ramp-database`
...............

- AWS runner: better detection of training errors :pr:`591`
- Switch to fetching starting kit repos via HTTP rather than using git clone to avoid being blocked by Github :pr:`592`.
5 changes: 5 additions & 0 deletions ramp-engine/ramp_engine/aws/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,11 @@ def _training_successful(config, instance_id, submission_name, actual_nb_folds=N

cmd = "find {}|egrep 'fold.*/y_pred_test.npz'|wc -l".format(folder)
nb_test_files = int(_run(config, instance_id, cmd, return_output=True))

cmd = f"find {folder}|egrep 'fold.*/error.txt'|wc -l"
n_error = int(_run(config, instance_id, cmd, return_output=True))
if n_error > 0:
return False
if actual_nb_folds is not None:
return nb_folds == nb_train_files == nb_test_files == actual_nb_folds
else:
Expand Down

0 comments on commit 52e5650

Please sign in to comment.