SIENTIAPDE-1222

SIENTIAPDE-1214: Enhance MLFlow and tests with datetime index handling and logging improvements

- Added a new method in MLFlow to detect and parse datetime indices in DataFrames, ensuring proper format and raising errors for invalid types.
- Updated prediction workflows to utilize the new datetime index handling, improving data integrity during transformations.
- Enhanced logging in model_repository to include detailed data outputs for better traceability.
- Adjusted timeout settings in prediction workflows for improved execution time management.
- Updated tests.ipynb to include additional checks for index types and outputs for better validation of functionality.
This commit is contained in:
vitor-aignosi
2025-09-15 14:47:24 -03:00
parent caca923717
commit 934298b3c3
9 changed files with 144 additions and 829 deletions

View File

@@ -90,6 +90,7 @@ class MLFlowRepository():
end_time = datetime.now()
data = pd.DataFrame(data, columns=['prediction'])
self.logger.info(f"Data: {data.to_string()}")
data.index = input_index
data['response_time'] = (end_time - start_time).total_seconds()