From 39aa0893848d93c6bc55a433b06ae796aea2320d Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Tue, 16 Sep 2025 10:36:43 -0300 Subject: [PATCH] SIENTIAPDE-1222 Enhance MLFlow debug logging to limit output size - Updated debug logging statements in the MLFlow activity to include a maximum of 5 items and a depth of 5 for the sample dictionary, improving readability and reducing log clutter for raw and transformed response data. --- laborious/activities/mlflow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/laborious/activities/mlflow.py b/laborious/activities/mlflow.py index e0e7cb3..aae09ee 100644 --- a/laborious/activities/mlflow.py +++ b/laborious/activities/mlflow.py @@ -162,7 +162,7 @@ class MLFlow(BaseActivity): ) self.debug( - f"Transform raw response data: \n {create_sample_dict(response_data)}", metadata) + f"Transform raw response data: \n {create_sample_dict(response_data, max_items=5, max_depth=5)}", metadata) if response_data['success']: @@ -194,7 +194,7 @@ class MLFlow(BaseActivity): response_data['content'] = response_dataframe.to_dict() self.debug( - f"Transform response data: \n {create_sample_dict(response_data)}", metadata) + f"Transform response data: \n {create_sample_dict(response_data, max_items=5, max_depth=5)}", metadata) self.info("Data transformed successfully", metadata) @@ -247,7 +247,7 @@ class MLFlow(BaseActivity): ) self.debug( - f"Prediction response data: \n {create_sample_dict(response_data)}", metadata) + f"Prediction response data: \n {create_sample_dict(response_data, max_items=5, max_depth=5)}", metadata) self.info("Data predicted successfully", metadata)