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.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user