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:
vitor-aignosi
2026-04-01 13:53:23 -03:00
parent b9fe4604f7
commit 381856f5ca
9 changed files with 74 additions and 31 deletions

View File

@@ -474,7 +474,9 @@ class MLFlowRepository(SientiaMonitoring):
raw_model = mlflow.pyfunc.load_model(artifact_path)
model = raw_model._model_impl.python_model
self.debug(f"Model wrapper loaded: {model.__class__.__name__}:{model.__dict__}", metadata)
self.debug(
f'Model wrapper loaded: {model.__class__.__name__}:{model.__dict__}', metadata
)
else:
if model_type == 'predict':
model = await self.load_predict_model(model_name, metadata, flavor)
@@ -1293,7 +1295,9 @@ class MLFlowRepository(SientiaMonitoring):
end_time = datetime.now()
if isinstance(predict_data, pd.DataFrame):
self._debug_dataframe('Data received from model prediction:', predict_data, metadata)
self._debug_dataframe(
'Data received from model prediction:', predict_data, metadata
)
# predict_data.to_csv(
# f"tmp/predicted_data_{model_name}.csv", index=True)