Commit Graph

461 Commits

Author SHA1 Message Date
vitor-aignosi
b2ef523c3b SIENTIAPDE-1222
Update test cases in model repository and prediction process

- Replaced string data with MagicMock in test_transform_success and test_transform_error to improve test isolation.
- Updated the predict method calls in test_predict_success and test_predict_error to reflect changes in argument structure.
- Added 'prediction_store_policy' to the test_run configuration in test_prediction_process for consistency with recent updates.
2025-09-17 10:07:32 -03:00
vitor-aignosi
2075b30243 SIENTIAPDE-1222
Refactor datetime index handling in MLFlow and MLFlowRepository

- Moved the detect_and_parse_datetime_index method from MLFlow to MLFlowRepository for better organization and reusability.
- Updated the method to include enhanced logging and error handling for invalid datetime formats.
- Adjusted the transform method in MLFlowRepository to utilize the new datetime index parsing logic.
- Added unit tests for both valid and invalid datetime index cases to ensure robustness.
2025-09-17 08:59:12 -03:00
vitor-aignosi
25bc4d06ca SIENTIAPDE-1222
Update README.md to reflect new features and configuration changes

- Added details about two dedicated task queues: `predictions_batch-queue` and `minimal_retrain-queue`.
- Enhanced descriptions of activities and workflows, including multiple inheritance patterns and configurable MLFlow model serving.
- Updated monitoring metrics section to include new labels and metrics for prediction and OPC export operations.
- Revised configuration section with updated default values and added new environment variables for Kubernetes pod identification.
- Improved clarity in the Predictions Batch Workflow configuration example, including structured input filters and updated retention policies.
2025-09-16 17:07:44 -03:00
vitor-aignosi
a5fc526f61 SIENTIAPDE-1222
Update model configuration key for compression in MLFlowRepository

- Changed the key for compression from 'compressed' to 'is_compressed' in model configuration handling to ensure consistency with updated standards.
2025-09-16 13:04:43 -03:00
vitor-aignosi
2b45c1cbd4 SIENTIAPDE-1222
Update model configuration keys in MLFlowRepository for consistency

- Changed 'model_retention' to 'retention_minutes' and 'is_compressed' to 'compressed' in model configuration handling, ensuring alignment with updated configuration standards.
2025-09-16 12:34:56 -03:00
vitor-aignosi
b1951ea2c0 SIENTIAPDE-1222
Enhance debug logging in MLFlowRepository to improve data traceability

- Added a debug logging statement to capture received data for model prediction, improving visibility into input data.
- Changed an existing info logging statement to debug level for consistency, ensuring all relevant data is logged at the appropriate level.
2025-09-16 11:54:35 -03:00
vitor-aignosi
74f7e6c024 SIENTIAPDE-1222
Update prediction_store_policy handling in workflows

- Added 'prediction_store_policy' to the input data handling in PredictionsBatch, ensuring a default value of 'lts:1' is used when not provided.
- Modified FormatAndExportPrediction to directly use 'prediction_store_policy' from input_data, removing the default fallback.
- Updated PredictionProcess to include 'prediction_store_policy' in the output data structure, ensuring consistency across workflows.
2025-09-16 11:41:27 -03:00
vitor-aignosi
7fb416313e 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.
2025-09-16 10:36:43 -03:00
vitor-aignosi
ce288c3926 SIENTIAPDE-1222
Refactor debug logging in Gates activity for improved readability

- Reformatted the debug logging statement for input data in the Gates activity to enhance clarity and maintain consistency with previous logging improvements.
2025-09-16 10:31:30 -03:00
vitor-aignosi
0ffd96e734 SIENTIAPDE-1222
Refactor MLFlow debug logging for improved readability

- Reformatted debug logging statements in the MLFlow activity to enhance clarity and consistency.
- Ensured that the output of raw and transformed response data is presented in a more readable format, maintaining the use of create_sample_dict for better visualization.
2025-09-16 10:29:35 -03:00
vitor-aignosi
eefd0815d8 SIENTIAPDE-1222
Update image tag in values.yaml and enhance debug logging in Gates and MLFlow activities

- Updated the image tag in values.yaml from '0.0.1' to '0.0.2'.
- Improved debug logging in the Gates activity to format input data and filters for better readability.
- Enhanced MLFlow activity logging to include formatted output for raw and transformed response data, ensuring consistent logging format.
2025-09-16 10:22:51 -03:00
vitor-aignosi
41af0a8032 SIENTIAPDE-1222
Update requirements and enhance logging in Gates and MLFlow activities

- Updated the sientia-dataops-library and sientia-mlops-library dependencies in requirements.txt to the latest versions.
- Improved debug logging in the Gates activity to display a sample of input data and filters, enhancing clarity and reducing output size.
- Refactored MLFlow activity logging to utilize the create_sample_dict function for better visualization of nested data structures in logs.
2025-09-16 08:54:27 -03:00
vitor-aignosi
1a9c1a31c5 SIENTIAPDE-1222
SIENTIAPDE-1222
Enhance MLFlow logging with sample dictionary for response data

- Introduced a new method to create a sample dictionary for debugging, allowing for better visualization of nested data structures in logs.
- Updated debug logging to utilize the new sampling method for raw and transformed response data, improving clarity and reducing output size.
- Adjusted logging for processed input data to display only the first few rows, enhancing readability.
2025-09-16 08:16:30 -03:00
vitor-aignosi
6d10e4c597 SIENTIAPDE-1222
Refactor MLFlow logging to enhance data output clarity

- Updated debug logging to use data.to_string() for processed input data, improving readability.
- Modified raw response data logging to format the output as a string, ensuring consistent logging format.
2025-09-16 07:55:56 -03:00
vitor-aignosi
cc692e6dbd SIENTIAPDE-1222
Update values.yaml and MLFlow logging for courier integration

- Changed the image repository to 'sientia-module-courier' and updated the image tag to '0.0.1'.
- Modified environment variables for GITHUB_BRANCH and MLFLOW_PASSWORD to reflect new configurations.
- Enhanced MLFlow logging to include additional debug statements for raw response data and added a check for empty DataFrames.
2025-09-16 07:52:21 -03:00
vitor-aignosi
a817d9855b SIENTIAPDE-1222
Refactor MLFlow logging to improve data output clarity

- Updated the debug logging to directly capture the output of data.to_csv, enhancing traceability of processed input data.
- Removed redundant debug statements for raw response data to streamline logging and focus on essential information.
2025-09-15 15:16:27 -03:00
vitor-aignosi
df7ce9e79b SIENTIAPDE-1222
Remove obsolete data files: deleted data.csv and response_data.csv to streamline project structure and eliminate unused resources.
2025-09-15 14:47:46 -03:00
vitor-aignosi
934298b3c3 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.
2025-09-15 14:47:24 -03:00
vitor-aignosi
caca923717 SIENTIAPDE-1214
SIENTIAPDE-1214: Update requirements.txt to clarify dependencies and improve project setup

- Commented out the previous sientia-mlops-library dependency for better clarity.
- Ensured that the requirements.txt reflects the current state of dependencies for easier management.
2025-09-12 14:30:52 -03:00
vitor-aignosi
6df04b72e5 SIENTIAPDE-1214
SIENTIAPDE-1214: Refactor MLFlow and model repository methods to use model_config dictionary

- Updated MLFlow class methods to accept model_config instead of model_retention for improved flexibility.
- Modified model_repository methods to handle model_config, extracting necessary parameters for transformation and prediction.
- Adjusted predictions_batch and prediction_process workflows to utilize model_config for better configuration management.
- Commented out the previous sientia-mlops-library dependency in requirements.txt for clarity.
2025-09-12 14:23:35 -03:00
vitor-aignosi
4a4043c354 SIENTIAPDE-1214
Update README.md to include additional PostgreSQL, OPC, and MongoDB configuration options for enhanced clarity and usability
2025-09-05 16:49:38 -03:00
Bruno Domingues
8340189741 Merge pull request #20 from Aignosi/SIENTIAPDE-1182-ajustar-laborious-para-pegar-timestamp-da-resposta-do-mlflow
SIENTIAPDE-1182: Enhance tests and refactor data structures for improved clarity and functionality
2025-09-05 10:39:41 -03:00
vitor-aignosi
f971e711bd SIENTIAPDE-1182
Update tests.ipynb and gates.py for enhanced functionality and clarity

- Adjusted execution count in tests.ipynb for reproducibility.
- Modified DataFrame creation in tests.ipynb to dynamically set size and update timestamp frequency.
- Added a new filter function for empty data in gates.py to improve data handling.
2025-09-04 15:39:01 -03:00
vitor-aignosi
8ab1b9b437 SIENTIAPDE-1182
Refactor test data structure in gates.py and model_repository.py for improved clarity and consistency

- Updated test cases in test_gates.py to use dictionaries for prediction and response_time, associating values with timestamps.
- Modified test_predict_success in test_model_repository.py to create a DataFrame with named indices for better readability in assertions.
2025-09-04 12:16:14 -03:00
vitor-aignosi
2e420dadba SIENTIAPDE-1182
Enhance tests.ipynb and gates.py for improved logging and output clarity

- Set execution count to null in tests.ipynb for reproducibility.
- Added stdout output to tests.ipynb for better visibility of results.
- Updated DataFrame display logic in tests.ipynb to include additional print statements for length and size.
- Improved debug logging in gates.py to log prediction data as a string for better traceability.
- Changed info log in gates.py to use len() instead of size for consistency.
2025-09-04 09:51:58 -03:00
vitor-aignosi
da21c128f8 SIENTIAPDE-1182
Update tests.ipynb and values.yaml for improved functionality and versioning

- Updated execution count in tests.ipynb for reproducibility.
- Modified DataFrame creation in tests.ipynb to include a timestamp column and save to CSV.
- Changed image tag in values.yaml from "0.4.4" to "0.4.5" for versioning.
- Updated GITHUB_BRANCH in values.yaml to reflect the latest branch adjustments.
2025-09-04 09:36:23 -03:00
Bruno Domingues
460bfe4073 Merge pull request #19 from Aignosi/SIENTIAPDE-1084-ajustar-documentacao
SIENTIAPDE-1084: Refactor OPC activities, update prediction workflow, and enhance documentation
2025-09-03 13:31:38 +00:00
vitor-aignosi
456eb5c674 SIENTIAPDE-1084
Refactor debug logging in gates.py to remove f-string usage for improved consistency and readability
2025-09-03 09:53:07 -03:00
vitor-aignosi
69a44d5200 SIENTIAPDE-1084
Update requirements.txt to upgrade sientia-dataops-library from version 1.4.4 to 1.4.5 and sientia-mlops-library from version 0.38.12 to 0.38.13
2025-09-03 09:08:12 -03:00
vitor-aignosi
bac17579d6 SIENTIAPDE-1084
Refactor connectors_config.py and conditional_filters.py for improved configuration management and data filtering

- Updated PostgreSQL and MLFlow configuration functions to enhance default values and environment variable handling.
- Simplified OPC server configuration logic and improved MongoDB connection string construction.
- Refactored conditional filters to streamline null value checks and empty data validation, removing unnecessary comments and examples for clarity.
- Removed extensive module docstrings to enhance code readability.
2025-09-03 08:42:24 -03:00
vitor-aignosi
e0cb3cded7 SIENTIAPDE-1084
Remove requirements_prepared.txt as it is no longer needed in the project.
2025-09-03 08:20:14 -03:00
vitor-aignosi
430af65359 SIENTIAPDE-1084
Update README.md to enhance installation instructions and refactor MLFlow filters

- Added steps for installing GitHub CLI and authenticating with GitHub.
- Updated the `api_error_filter` and `nan_values_filter` functions to improve parameter handling and streamline logic.
2025-09-03 08:20:01 -03:00
vitor-aignosi
a13c7a09ae SIENTIAPDE-1084
Update requirements.txt to upgrade sientia-mlops-library from version 0.38.11 to 0.38.12
2025-09-02 09:48:24 -03:00
vitor-aignosi
8f9b0729e6 SIENTIAPDE-1084
Update requirements.txt to upgrade sientia-mlops-library from version 0.38.8 to 0.38.11
2025-09-02 09:36:27 -03:00
vitor-aignosi
c4dd22d889 SIENTIAPDE-1084
Refactor quality-gate.yml to eliminate unnecessary SSH URL configuration for OAuth2 authentication
2025-09-01 16:46:36 -03:00
vitor-aignosi
3d7b69e742 SIENTIAPDE-1084
Refactor Git configuration in quality-gate.yml to remove redundant SSH URL replacement for OAuth2 authentication
2025-09-01 16:39:27 -03:00
vitor-aignosi
38b20c790f SIENTIAPDE-1084
Update quality-gate.yml to configure Git for OAuth2 authentication

- Added global Git configuration to replace SSH and HTTPS URLs with OAuth2 token-based authentication for GitHub access.
2025-09-01 16:36:01 -03:00
vitor-aignosi
42b1f6e0a4 Merge branch 'main' into SIENTIAPDE-1084-ajustar-documentacao 2025-09-01 16:05:31 -03:00
vitor-aignosi
844a2e84cf SIENTIAPDE-1084
Remove all module docstrings and the versioning information from the Laborious package, activities, utils, and workflows. This cleanup enhances code readability and reduces unnecessary comments in the codebase.
2025-09-01 16:03:03 -03:00
vitor-aignosi
f9784b8f3e SIENTIAPDE-1182
Update README.md to enhance architecture documentation

- Removed detailed system overview diagram to streamline content.
- Added architecture diagrams for key workflows: PredictionsBatch, PredictionProcess, FormatAndExportPrediction, and MinimalRetrain.
- Improved clarity and structure of the architecture principles section.
2025-08-29 16:59:00 -03:00
vitor-aignosi
d37a53f5ea SIENTIAPDE-1182
Update README.md to change section title from 'Workflow Configuration' to 'MongoDB pipeline configuration'
2025-08-29 16:04:30 -03:00
vitor-aignosi
25a8e529fa SIENTIAPDE-1182
Add section for Predictions Batch Workflow in README.md
2025-08-29 16:02:12 -03:00
vitor-aignosi
aa45fc8b99 SIENTIAPDE-1182
Update README.md to reflect changes in prediction workflow configuration

- Revised input parameters for the prediction process, including updates to schedule name, model ID, and workflow name.
- Enhanced structure of input filters and MLflow filter policies for improved clarity and functionality.
- Introduced new fields for model retention and output configuration, while maintaining backward compatibility with existing parameters.
2025-08-29 15:59:46 -03:00
vitor-aignosi
ec3df522f7 SIENTIAPDE-1182
Remove input_sample.json configuration file as part of project cleanup.
2025-08-29 15:36:11 -03:00
vitor-aignosi
cda94a3850 SIENTIAPDE-1182
Update README.md to reflect new prediction workflow configuration

- Revised input parameters for the prediction process, including changes to schedule name, model ID, and workflow type.
- Introduced new fields for workflow execution frequency, maximum retry policy, and query for data retrieval.
- Updated input and MLflow filter structures to enhance clarity and functionality.
- Added support for datetime columns and updated retention time for models.
2025-08-29 15:28:51 -03:00
vitor-aignosi
995ba7900a SIENTIAPDE-1182
Remove Docker configuration files and refactor project structure

- Deleted docker-compose.yml and Dockerfile as part of the project restructuring.
- Updated README.md to reflect changes in project setup and configuration.
- Introduced a new __init__.py file in the laborious package to provide an overview of the system.
- Enhanced documentation across various modules, including metrics, activities, and workflows, to improve clarity and usability.
- Added comprehensive docstrings and comments to key classes and methods for better maintainability.
2025-08-29 13:22:48 -03:00
Bruno Domingues
5a456dcc7a Merge pull request #18 from Aignosi/SIENTIAPDE-1205-alterar-opc-para-assincrono
SIENTIAPDE-1205: Refactor OPC Repository for Asynchronous Handling and Configuration Updates
2025-08-29 14:00:56 +00:00
vitor-aignosi
30c1d6746a SIENTIAPDE-1182
Implement prediction store policy handling in Gates activity

- Added a new method `get_prediction_store_policy` to validate and parse the prediction store policy.
- Updated `format_prediction` method to utilize the new policy handling, allowing for sorting of predictions based on the specified policy.
- Enhanced test coverage for the new policy handling, including various scenarios for valid and invalid policies.
- Removed the obsolete `coverage.sh` script.
2025-08-28 16:31:55 -03:00
vitor-aignosi
7f3ecc9add SIENTIAPDE-1205
Refactor OpcRepository and update tests for async handling

- Removed the shutdown method from OpcRepository and adjusted the disconnect logic.
- Updated tests in test_activities.py and test_opc.py to support async shutdown functionality.
- Enhanced test cases in test_opc_repository.py to ensure proper async behavior and error handling in OpcRepository methods.
2025-08-28 14:39:00 -03:00
vitor-aignosi
fc799de42e SIENTIAPDE-1205
Revert image tag in values.yaml to 0.4.4 and rename shutdown method in OpcRepository class

- Changed image tag in values.yaml from 0.4.5 back to 0.4.4.
- Renamed __del__ method to shutdown in OpcRepository for clarity.
- Enhanced connection validation logic in OpcRepository to improve error handling and logging.
2025-08-28 14:39:00 -03:00