From 693efbb72ba3c156d417fef24197e26a7af53aae Mon Sep 17 00:00:00 2001 From: Carla Pinto Date: Fri, 9 Oct 2026 14:55:42 +0200 Subject: [PATCH] =?UTF-8?q?rc/SIENTIAPDE-2167-=20fix:=20corrige=20artefato?= =?UTF-8?q?=20de=20refer=C3=AAncia=20desatualizado=20no=20teste=20e2e=20de?= =?UTF-8?q?=20drift?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- e2e/test_drift.py | 5 +++-- laborious/activities/mlflow.py | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/e2e/test_drift.py b/e2e/test_drift.py index 7941bf5..f52b910 100644 --- a/e2e/test_drift.py +++ b/e2e/test_drift.py @@ -142,7 +142,7 @@ def _recent_minute_timestamps(count: int, offset_minutes: int = 6) -> list[str]: def _configure_reference_csv(mlflow_repository_stub, reference_rows: pd.DataFrame) -> None: """ Wire ``mlflow_repository_stub`` so ``get_reference_data`` returns - ``reference_rows`` by writing them to ``dst_path/retrain_input.csv``. + ``reference_rows`` by writing them to ``dst_path/evaluation_data.csv``. Args: - mlflow_repository_stub: External MLflow repository fixture. @@ -158,7 +158,8 @@ def _configure_reference_csv(mlflow_repository_stub, reference_rows: pd.DataFram run_id='fake-reference-run' ) file_info = MagicMock() - file_info.path = 'retrain_input.csv' + # Matches `MLFlow._REFERENCE_ARTIFACT_CANDIDATES` (SIENTIAPDE-1646). + file_info.path = 'evaluation_data.csv' mlflow_repository_stub._client.list_artifacts.return_value = [file_info] mlflow_repository_stub.download_artifacts.side_effect = _download diff --git a/laborious/activities/mlflow.py b/laborious/activities/mlflow.py index 80d007d..b985cfd 100644 --- a/laborious/activities/mlflow.py +++ b/laborious/activities/mlflow.py @@ -664,7 +664,7 @@ class MLFlow(SientiaMonitoring): """ Pick the first available reference CSV artifact path from the MLflow run. - Candidates are checked in priority order: ``retrain_input.csv``, then ``train_data.csv``. + Candidates are checked in priority order: ``evaluation_data.csv``, then ``test_data.csv``. A path matches when it equals the candidate or ends with ``/`` for nested layouts. Args: @@ -703,9 +703,9 @@ class MLFlow(SientiaMonitoring): """ Download reference training CSV from the MLflow run linked to the production alias. - Resolves ``retrain_input.csv`` or ``train_data.csv`` via artifact listing before download. - ``retrain_input.csv`` is preferred when both exist (most recent retrain snapshot). Used by - drift workflows to compare live data against the reference distribution logged with the model. + Resolves ``evaluation_data.csv`` or ``test_data.csv`` via artifact listing before download. + ``evaluation_data.csv`` is preferred when both exist. Used by drift workflows to compare + live data against the reference distribution logged with the model. Timestamps are normalized to ``DATETIME_FORMAT`` string columns before returning records. Args: