From ddc248e8ff320aef5ce2747607f5d511a6d5c122 Mon Sep 17 00:00:00 2001 From: Francois Caud Date: Thu, 29 Feb 2024 17:39:58 +0100 Subject: [PATCH] add a cmd to find error in _training_successful --- ramp-engine/ramp_engine/aws/api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ramp-engine/ramp_engine/aws/api.py b/ramp-engine/ramp_engine/aws/api.py index e273365e..b63a3e20 100644 --- a/ramp-engine/ramp_engine/aws/api.py +++ b/ramp-engine/ramp_engine/aws/api.py @@ -834,6 +834,12 @@ 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: