SIENTIAPDE-1645: Refactor temporary directory cleanup activity by extracting processing and deletion logic into dedicated helper methods. Update train_test_split to use a local numpy.random generator for improved reproducibility. Remove an unnecessary else: pass block.

This commit is contained in:
Bruno Domingues
2026-08-05 12:10:54 -03:00
parent 4133e200f7
commit e3e1c712a8
3 changed files with 91 additions and 52 deletions

View File

@@ -136,8 +136,6 @@ class TrainModel:
run_dir=train_result.get('run_dir'),
metadata=metadata,
)
else:
pass
except Exception: # noqa: BLE001
# If cleanup fails after training failed, there is nothing extra to log (DB not committed).
if training_succeeded: # pragma: no branch