SIENTIAPDE-1312

Refactor error handling in MLFlowRepository and update tests

- Improved error message formatting in MLFlowRepository for better readability.
- Updated test assertions to ensure correct calls to MLflow methods during experiment retrieval and creation.
This commit is contained in:
vitor-aignosi
2025-10-21 15:58:28 -03:00
parent 197a25ebf7
commit c5fb921654
2 changed files with 7 additions and 2 deletions

View File

@@ -178,7 +178,9 @@ class MLFlowRepository:
experiment_id = mlflow.create_experiment(experiment_name)
experiment = mlflow.get_experiment(experiment_id)
if experiment is None:
raise ValueError(f'Experiment {experiment_name} not found after creation, unknown reason')
raise ValueError(
f'Experiment {experiment_name} not found after creation, unknown reason'
)
else:
raise ValueError(f'Experiment {experiment_name} not found')