From 830dfe464ef08284b6e7e1abaab642d8431c9682 Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Wed, 25 Mar 2026 12:45:44 -0300 Subject: [PATCH] SIENTIAPDE-1712 Update Gates and FormatAndExportPrediction classes to standardize timestamp usage - Changed 'last_timestamp' to 'timestamp' in the Gates class for consistency in input data handling. - Updated the FormatAndExportPrediction class to reflect the same change in the output data structure. --- laborious/activities/gates.py | 4 ++-- .../workflows/sub_workflows/format_and_export_prediction.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/laborious/activities/gates.py b/laborious/activities/gates.py index 0e8dc82..12fafdf 100644 --- a/laborious/activities/gates.py +++ b/laborious/activities/gates.py @@ -523,7 +523,7 @@ class Gates(MinioManager): Args: input_data (dict): Input data containing: - data (dict[str, Any]): Raw prediction data to format - - last_timestamp (str): Last timestamp of the data + - timestamp (str): Timestamp of the data - model_id (str): Unique identifier for the ML model - prediction_confidence (float): Confidence score for the prediction - prediction_store_policy (str): Storage policy in format 'type:value' @@ -532,7 +532,7 @@ class Gates(MinioManager): dict: Formatted prediction data ready for storage and export """ metadata = input_data['metadata'] - last_timestamp = input_data['last_timestamp'] + last_timestamp = input_data['timestamp'] prediction_store_policy = input_data['prediction_store_policy'] self.info('Formatting prediction...', metadata) diff --git a/laborious/workflows/sub_workflows/format_and_export_prediction.py b/laborious/workflows/sub_workflows/format_and_export_prediction.py index 1cd2be1..a9cda2a 100644 --- a/laborious/workflows/sub_workflows/format_and_export_prediction.py +++ b/laborious/workflows/sub_workflows/format_and_export_prediction.py @@ -101,7 +101,7 @@ class FormatAndExportPrediction: { **metadata, 'data': data, - 'last_timestamp': input_data['last_timestamp'], + 'timestamp': input_data['timestamp'], 'model_id': input_data['model_id'], 'prediction_confidence': prediction_confidence, 'prediction_store_policy': input_data['prediction_store_policy'],