SIENTIAPDE-1712
SIENTIAPDE-1712 Enhance logging across various classes by adding logger parameters and improving debug statements. This update includes adjustments in Gates, MLFlow, ModelMetrics, and MLFlowRepository classes for better traceability and observability during operations.
This commit is contained in:
@@ -541,6 +541,7 @@ async def test_format_prediction_no_timestamp(gates_activity):
|
||||
'model_id': 'test_model',
|
||||
'prediction_confidence': 0.9,
|
||||
'prediction_store_policy': 'lts:1',
|
||||
'timestamp': '2023-05-26 11:12:27',
|
||||
}
|
||||
|
||||
# Act
|
||||
@@ -580,6 +581,7 @@ async def test_format_prediction_with_timestamp_erl(gates_activity):
|
||||
'model_id': 'test_model',
|
||||
'prediction_confidence': 0.9,
|
||||
'prediction_store_policy': 'erl:2',
|
||||
'timestamp': '2023-05-26 11:12:27',
|
||||
}
|
||||
|
||||
# Act
|
||||
@@ -619,6 +621,7 @@ async def test_format_prediction_with_timestamp_lts(gates_activity):
|
||||
'model_id': 'test_model',
|
||||
'prediction_confidence': 0.9,
|
||||
'prediction_store_policy': 'lts:2',
|
||||
'timestamp': '2023-05-26 11:12:27',
|
||||
}
|
||||
|
||||
# Act
|
||||
@@ -655,6 +658,7 @@ async def test_format_prediction_with_timestamp_invalid_policy(gates_activity):
|
||||
'model_id': 'test_model',
|
||||
'prediction_confidence': 0.9,
|
||||
'prediction_store_policy': 'lts:2',
|
||||
'timestamp': '2023-05-26 11:12:27',
|
||||
}
|
||||
gates_activity.get_prediction_store_policy = MagicMock(return_value=('invalid', 1))
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ async def test_request_transform_failure(mock_from_dataframe, mlflow):
|
||||
status=transform_response,
|
||||
workflow_metadata=metadata['metadata'],
|
||||
last_timestamp=payload.last_timestamp,
|
||||
logger=mlflow.logger,
|
||||
)
|
||||
assert response_data == mock_from_dataframe.return_value
|
||||
|
||||
@@ -252,6 +253,7 @@ async def test_request_predict_failure(mock_to_datetime, mock_from_dataframe, ml
|
||||
status=predict_response,
|
||||
workflow_metadata=metadata['metadata'],
|
||||
last_timestamp=payload.last_timestamp,
|
||||
logger=mlflow.logger,
|
||||
)
|
||||
assert response_data == mock_from_dataframe.return_value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user