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:
|
Args:
|
||||||
input_data (dict): Input data containing:
|
input_data (dict): Input data containing:
|
||||||
- data (dict[str, Any]): Raw prediction data to format
|
- 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
|
- model_id (str): Unique identifier for the ML model
|
||||||
- prediction_confidence (float): Confidence score for the prediction
|
- prediction_confidence (float): Confidence score for the prediction
|
||||||
- prediction_store_policy (str): Storage policy in format 'type:value'
|
- 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
|
dict: Formatted prediction data ready for storage and export
|
||||||
"""
|
"""
|
||||||
metadata = input_data['metadata']
|
metadata = input_data['metadata']
|
||||||
last_timestamp = input_data['last_timestamp']
|
last_timestamp = input_data['timestamp']
|
||||||
prediction_store_policy = input_data['prediction_store_policy']
|
prediction_store_policy = input_data['prediction_store_policy']
|
||||||
self.info('Formatting prediction...', metadata)
|
self.info('Formatting prediction...', metadata)
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class FormatAndExportPrediction:
|
|||||||
{
|
{
|
||||||
**metadata,
|
**metadata,
|
||||||
'data': data,
|
'data': data,
|
||||||
'last_timestamp': input_data['last_timestamp'],
|
'timestamp': input_data['timestamp'],
|
||||||
'model_id': input_data['model_id'],
|
'model_id': input_data['model_id'],
|
||||||
'prediction_confidence': prediction_confidence,
|
'prediction_confidence': prediction_confidence,
|
||||||
'prediction_store_policy': input_data['prediction_store_policy'],
|
'prediction_store_policy': input_data['prediction_store_policy'],
|
||||||
|
|||||||
Reference in New Issue
Block a user