Commit Graph

131 Commits

Author SHA1 Message Date
vitor-aignosi
46e21c7538 SIENTIAPDE-1199
Enhance logging in MLFlow activity to include formatted JSON response data

- Added JSON import for better formatting of response data in debug logs.
- Updated logging statements to output transformed and prediction response data as pretty-printed JSON, improving readability and debugging context.
2025-08-19 12:12:15 -03:00
vitor-aignosi
8012ff778c SIENTIAPDE-1199
Refactor logging in OpcRepository to include full metadata in error and info messages

- Updated logging statements in the OpcRepository class to pass the complete metadata object instead of just the schedule name, enhancing the context available for debugging and monitoring.
2025-08-19 11:52:42 -03:00
vitor-aignosi
3a06f0ca39 SIENTIAPDE-1199
Update dependencies and refactor logging imports for observability

- Updated the sientia-dataops-library dependency version to 1.4.0 in requirements.txt.
- Changed image tag in values.yaml from 0.3.2 to 0.4.1.
- Refactored logging imports across multiple files to use the new observability module instead of the temporal.utils.logger.
- Updated retry policy imports in workflow files to reflect the new module structure.
2025-08-19 10:42:27 -03:00
vitor-aignosi
3ee076214c SIENTIAPDE-1169
Implement server validation and output tag management in OPC class

- Added a new method to validate the existence of OPC servers before writing data, improving error handling.
- Introduced a method to manage writing of prediction and confidence tags, streamlining the data writing process.
- Refactored the write_opc_data method to utilize the new validation and management methods for better code organization and clarity.
2025-08-19 09:07:05 -03:00
vitor-aignosi
fc6c95c264 SIENTIAPDE-1169
Refactor OPC data writing and repository initialization

- Simplified success tracking logic in the OPC class for writing prediction and confidence data.
- Removed unused pod_id attribute from OpcRepository initialization.
- Updated test cases to include pod_id for improved metrics tracking during data writing operations.
2025-08-19 08:31:58 -03:00
vitor-aignosi
cc7efba887 SIENTIAPDE-1169
Refactor OPC data writing to improve success tracking

- Updated the OPC class to store the success status of data writing operations for both prediction and confidence tags.
- Added logging for successful and failed writes to the OPC server, enhancing traceability of data operations.
2025-08-18 16:30:33 -03:00
vitor-aignosi
37a31a51a4 SIENTIAPDE-1169
Refactor OPC metrics to use unpacking for CORE_LABELS in metrics.py

- Updated the definition of prediction OPC writing metrics to utilize unpacking for CORE_LABELS, enhancing code clarity and maintainability.
2025-08-18 14:17:43 -03:00
vitor-aignosi
e567b8d0a7 SIENTIAPDE-1169
Update OPC metrics to include opc_server_id for enhanced tracking
2025-08-18 14:15:22 -03:00
vitor-aignosi
366d406689 SIENTIAPDE-1169
Enhance OpcRepository initialization to include pod_id for improved tracking
2025-08-18 14:08:00 -03:00
vitor-aignosi
f56755b69e SIENTIAPDE-1169
Refactor opc_repository.py to import metrics module

- Added import statement for the metrics module to enhance functionality in the OPC repository.
- This change supports the integration of metrics tracking for OPC operations.
2025-08-18 14:04:02 -03:00
vitor-aignosi
e35eb300cb SIENTIAPDE-1169
Implement OPC writing metrics and enhance OPC class initialization

- Added metrics for counting predictions written to the OPC server and monitoring their response times.
- Enhanced the OPC class initialization to include the pod ID for better tracking.
- Updated the write method to increment the prediction count and observe response times.
2025-08-18 13:58:43 -03:00
vitor-aignosi
6eb71739db SIENTIAPDE-1169
Update helm chart version in values.yaml to 0.5.0
2025-08-18 13:47:50 -03:00
vitor-aignosi
e82b25582c SIENTIAPDE-1169
Update helm chart version in values.yaml and modify logging in worker.py

- Updated helm upgrade command in values.yaml to version 0.5.0-uat.
- Changed log message in worker.py to indicate the start of the SDK Metrics Server, while retaining the original log for the Temporal Client.
2025-08-18 09:45:54 -03:00
vitor-aignosi
a2a9f95aa5 SIENTIAPDE-1169
SIENTIAPDE-1174 Add SDK metrics configuration and update worker for telemetry

- Introduced sdk-metrics service in values.yaml with ClusterIP configuration.
- Updated worker.py to integrate SDK metrics telemetry using the new HTTP_SDK_METRICS_PORT environment variable.
- Enhanced Prometheus configuration to bind SDK metrics to the specified port.
2025-08-18 09:41:17 -03:00
vitor-aignosi
7f3457e318 SIENTIAPDE-1169
Enhance BaseActivity initialization across multiple activities to include error counter

- Updated the initialization of the BaseActivity in Gates, MLFlow, and OPC classes to set the error counter to True, improving error tracking and handling capabilities.
2025-08-14 15:41:03 -03:00
vitor-aignosi
da10f900a8 SIENTIAPDE-1169
Update dependencies and configuration for improved functionality

- Updated sientia-dataops-library version from 1.3.7 to 1.3.8 in requirements.txt.
- Changed GITHUB_BRANCH in values.yaml to reflect new testing focus: SIENTIAPDE-1169.
- Modified notification level in gates.py from WARNING to ERROR for better error handling.
2025-08-14 15:25:04 -03:00
Bruno Domingues
f195b5116e Merge pull request #14 from Aignosi/SIENTIAPDE-1174-mapear-e-implementar-metricas-a-serem-criadas
Sientiapde 1174 mapear e implementar metricas a serem criadas
2025-08-13 16:35:04 -03:00
vitor-aignosi
dd513ddfaf SIENTIAPDE-1174
Add async test for write_metrics method in gates_activity

- Implemented a new test to validate the write_metrics functionality, ensuring metrics are correctly recorded for predictions, confidence, and response time.
- Utilized mocking to verify interactions with the metrics tracking system.
2025-08-05 14:39:02 -03:00
vitor-aignosi
fbdf9c3c6c SIENTIAPDE-1174
SIENTIAPDE-1174 Update tests to enhance MLFlow and workflow activity assertions

- Added logger initialization in MLFlowRepository for improved logging.
- Updated prediction test assertions to reflect changes in output structure.
- Increased activity method call count assertions in workflow tests for accuracy.
2025-08-05 14:19:56 -03:00
vitor-aignosi
3d7de2ef5e Merge branch 'main' into SIENTIAPDE-1174-mapear-e-implementar-metricas-a-serem-criadas 2025-08-05 14:05:09 -03:00
vitor-aignosi
c92e2f41c3 SIENTIAPDE-1174
pdate metrics tracking to include response time histogram

- Changed PREDICTION_RESPONSE_TIME_MONITOR from Gauge to Histogram for better response time analysis.
- Updated response time observation method in gates.py to utilize the new Histogram functionality.
2025-08-04 16:09:26 -03:00
vitor-aignosi
3cf7b4ec16 SIENTIAPDE-1174
SIENTIAPDE-1174 Update replica count and image tag in values.yaml

- Increased replicaCount from 1 to 3 for improved availability.
- Updated image tag from 0.3.1 to 0.3.2 for the latest features and fixes.
2025-08-04 15:24:20 -03:00
vitor-aignosi
663b286ad7 SIENTIAPDE-1174
SIENTIAPDE-1174 Update tests.ipynb to normalize counter and rollout values, and fix MLFlowRepository initialization error

- Changed execution_count for a cell to null for consistency.
- Updated normalization logic for counter and rollout values to scale between -100 and 100.
- Fixed TypeError in MLFlowRepository initialization by ensuring the logger argument is provided.
2025-08-04 10:03:15 -03:00
Bruno Domingues
28743eb720 Merge pull request #13 from Aignosi/SIENTIAPDE-1172-criar-pipeline-de-alertas-orquestrador
Sientiapde 1172 criar pipeline de alertas orquestrador
2025-08-04 10:02:56 -03:00
vitor-aignosi
47df5ebc60 SIENTIAPDE-1174
SIENTIAPDE-1174 Update MLFlowRepository initialization to include logger for enhanced logging capabilities
2025-08-01 17:15:49 -03:00
vitor-aignosi
669494c90b SIENTIAPDE-1174
Mark application as DOWN in metrics on shutdown to improve failure reporting
2025-08-01 12:01:29 -03:00
vitor-aignosi
963f089c7b SIENTIAPDE-1174
SIENTIAPDE-1174 Update replica count and enhance logging in MLFlow

- Changed replicaCount in values.yaml from 3 to 1 for reduced resource usage.
- Added debug logging for prediction response data in MLFlow to improve traceability.
2025-08-01 10:32:06 -03:00
vitor-aignosi
4f6f4d1fa9 SIENTIAPDE-1174
Enable data index reset in MLFlow by uncommenting data.reset_index, improving data processing consistency.
2025-08-01 10:20:42 -03:00
vitor-aignosi
4fb89b3862 SIENTIAPDE-1174
Comment out data.reset_index in MLFlow to prevent index reset during data processing, improving data handling without altering existing functionality.
2025-08-01 10:16:41 -03:00
vitor-aignosi
d2952654b4 SIENTIAPDE-1174
SIENTIAPDE-1174 Add write_metrics activity to main workflow for enhanced metrics tracking

- Included the write_metrics activity in the main workflow to support Prometheus metrics tracking.
2025-08-01 10:03:19 -03:00
vitor-aignosi
70f1abe681 SIENTIAPDE-1174
Update dependencies, modify replica count, and implement metrics tracking

- Updated sientia-dataops-library version from 1.3.5 to 1.3.7 in requirements.txt.
- Changed replicaCount in values.yaml from 5 to 3 and incremented image tag from 0.2.7 to 0.3.1.
- Added Prometheus metrics tracking in gates.py and worker.py, including a new write_metrics method.
- Configured Prometheus service and ServiceMonitor in values.yaml for metrics collection.
2025-08-01 10:00:47 -03:00
vitor-aignosi
6fb28a0050 SIENTIAPDE-1172
Update dependencies in requirements.txt and increment image tag in values.yaml

- Updated sientia-dataops-library version from 1.3.4 to 1.3.5 in requirements.txt.
- Incremented image tag in values.yaml from 0.2.5 to 0.2.7.
2025-07-29 13:19:29 -03:00
vitor-aignosi
c9dc00fd08 SIENTIAPDE-1172
Update GITHUB_BRANCH in values.yaml and enhance error notification handling in MLFlow

- Changed GITHUB_BRANCH in values.yaml to reflect the new pipeline for alerts orchestration.
- Added NotificationLevel.ERROR to error notifications in MLFlow for retraining and production model updates.
- Updated tests to verify error notification levels for model management workflows.
2025-07-29 12:45:28 -03:00
vitor-aignosi
26887c820c Merge pull request #12 from Aignosi/SIENTIAPDE-1171-criar-pipeline-de-retreino-laborious
Sientiapde 1171 criar pipeline de retreino laborious
2025-07-24 11:46:47 -03:00
vitor-aignosi
a34bdcd839 SIENTIAPDE-1171
Refactor data merging in MLFlowRepository to simplify merge operation in fit method. Removed unnecessary parameters for improved readability and maintainability.
2025-07-24 11:24:21 -03:00
vitor-aignosi
1261e4a8aa SIENTIAPDE-1171
Enhance data merging in MLFlowRepository by specifying the 'on' parameter for improved join accuracy. This change ensures that the merge operation correctly aligns data based on the 'id' field.
2025-07-24 10:56:05 -03:00
vitor-aignosi
a2492e244d SIENTIAPDE-1171
Enhance data merging in MLFlowRepository by specifying merge parameters

- Updated the merge operation in the fit method to include 'how' and 'validate' parameters for improved data integrity and flexibility during model training.
2025-07-24 10:30:20 -03:00
vitor-aignosi
c738e8b0df SIENTIAPDE-1171
Refactor model_repository and enhance test coverage for MLFlow functionalities

- Updated model_repository to ensure the 'temp' directory is created if it doesn't exist using `exist_ok=True`.
- Added new tests for retraining and updating production models, including error handling scenarios.
- Improved existing tests for model management workflows to ensure robustness and reliability.
2025-07-24 10:24:08 -03:00
vitor-aignosi
4283730e7a SIENTIAPDE-1171
Update GITHUB_BRANCH in values.yaml and refactor MLFlowRepository for model retraining

- Changed GITHUB_BRANCH in values.yaml to reflect the new pipeline for retraining.
- Refactored MLFlowRepository by introducing create_model_experiment and perform_model_retrain methods to streamline model retraining processes.
- Updated test cases to cover new functionalities and ensure proper error handling in model management workflows.
2025-07-23 16:51:33 -03:00
vitor-aignosi
89b9892a5b SIENTIAPDE-1171
Update dependencies and enhance ML model retraining functionality

- Updated sientia-dataops-library version in requirements.txt from 1.3.3 to 1.3.4.
- Incremented image tag in values.yaml from 0.2.4 to 0.2.5 and added a new environment variable MONGODB_TTL_INDEX_HOURS.
- Introduced new methods in MLFlowRepository for model retraining and production model updates, including error handling and logging.
- Added retrain_model and update_production_model activities in mlflow.py to support model management workflows.
- Modified MongoDB connection settings in connectors_config.py for improved security and configuration flexibility.
2025-07-23 12:02:16 -03:00
Bruno Domingues
9410de5f82 Merge pull request #11 from Aignosi/SIENTIAPDE-1151-criar-testes-de-stress
Sientiapde 1151 criar testes de stress
2025-07-22 12:22:46 -03:00
vitor-aignosi
4f315a1506 Merge branch 'main' into SIENTIAPDE-1151-criar-testes-de-stress 2025-07-22 11:34:16 -03:00
Bruno Domingues
1844118091 Merge pull request #10 from Aignosi/SIENTIAPDE-1163-alterar-dinamica-de-notificacoes-para-usar-o-mongodb-ao-inves-do-kafka
Sientiapde 1163 alterar dinamica de notificacoes para usar o mongodb ao inves do kafka
2025-07-22 10:14:23 -03:00
vitor-aignosi
40cf93d500 SIENTIAPDE-1151
Update GITHUB_BRANCH in values.yaml to reflect new stress testing branch and modify OPC error handling to set success flag instead of continuing on error.
2025-07-18 14:42:22 -03:00
vitor-aignosi
71d256d192 SIENTIAPDE-1151
Enhance OPC error handling by adding detailed notifications for missing servers during write operations. The notification includes the list of available OPC servers for better debugging.
2025-07-18 14:33:07 -03:00
vitor-aignosi
b440c7d547 SIENTIAPDE-1163
SIENTIAPDE-1163 Enhance OPC tests to improve error handling and notifications. Added tests for MongoDB configuration and refined connection error handling in OPC repository.
2025-07-17 15:21:10 -03:00
vitor-aignosi
488674c7e1 SIENTIAPDE-1163
Update requirements.txt to replace local dataops library path with git repository link for version 1.3.3.
2025-07-17 12:45:29 -03:00
vitor-aignosi
9bcf882d00 SIENTIAPDE-1163
Update .gitignore to include git_log and enhance README.md with instructions for generating a git log summary.
2025-07-17 12:37:54 -03:00
vitor-aignosi
515881b404 SIENTIAPDE-1163
Add MongoDB configuration to values.yaml for integration
2025-07-17 12:31:24 -03:00
vitor-aignosi
694ad265c8 SIENTIAPDE-1163
Refactor OPC connection handling to improve error notifications and update GITHUB_BRANCH in values.yaml for MongoDB integration. Change requirements.txt to point to local dataops library path.
2025-07-17 11:02:41 -03:00