SIENTIAPDE-1478
Refactor validation script and improve logging in API and model repository - Updated validation script to include 'e2e/' directory in code formatting and linting checks. - Enhanced error logging in API class to improve readability of error messages. - Refactored debug logging in model repository for better structured output. - Cleaned up import statements in various files for improved organization.
This commit is contained in:
@@ -1254,7 +1254,9 @@ class MLFlowRepository(SientiaMonitoring):
|
||||
input_index = data.index
|
||||
start_time = datetime.now()
|
||||
|
||||
self.debug(f'Data received for model prediction: {data.to_dict(orient="records")}', metadata)
|
||||
self.debug(
|
||||
f'Data received for model prediction: {data.to_dict(orient="records")}', metadata
|
||||
)
|
||||
|
||||
# data.to_csv(
|
||||
# f"tmp/treated_data_{model_name}.csv", index=True)
|
||||
@@ -1272,7 +1274,8 @@ class MLFlowRepository(SientiaMonitoring):
|
||||
|
||||
if isinstance(predict_data, pd.DataFrame):
|
||||
self.debug(
|
||||
f'Data received from model prediction: {predict_data.to_dict(orient="records")}', metadata
|
||||
f'Data received from model prediction: {predict_data.to_dict(orient="records")}',
|
||||
metadata,
|
||||
)
|
||||
|
||||
# predict_data.to_csv(
|
||||
|
||||
Reference in New Issue
Block a user