Commit Graph

88 Commits

Author SHA1 Message Date
vitor-aignosi
40870b021a SIENTIAPDE-1199
Refactor logging in worker module to include metadata in custom info and error messages

- Updated logging statements in the worker module to utilize custom_info and custom_error methods, incorporating a metadata dictionary for enhanced context.
- Improved visibility of key operations such as starting the worker, notification handler, and activities, as well as error handling for unhandled exceptions.
2025-08-20 10:51:38 -03:00
vitor-aignosi
8b9bb8d720 SIENTIAPDE-1199
Refactor logging in Gates and MLFlow activities to use info level for key operations

- Updated logging statements in the Gates class to replace debug logs with info logs for input and output gate operations, enhancing visibility.
- Modified MLFlow class to use info logs for data transformation and prediction processes, improving clarity in the logging output.
- Adjusted OPC class to return the count of successfully written tags, providing better insight into data writing operations.
2025-08-20 10:38:08 -03:00
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
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
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
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
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
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
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
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
vitor-aignosi
b6b0dba735 SIENTIAPDE-1163
Update notification handler references to use CoreNotificationHandler and add MongoDB configuration to connectors. Update GITHUB_BRANCH in values.yaml for optimization tasks.
2025-07-16 09:19:40 -03:00
vitor-aignosi
5787d9f7a0 SIENTIAPDE-1148
Refactor Gates activity to correctly sort data by timestamp and update exception handling in worker to include NOSONAR comment for clarity.
2025-07-11 12:09:24 -03:00
vitor-aignosi
ceb82354ea SIENTIAPDE-1141
SIENTIAPDE-1141 Update worker.py to configure concurrency limits for workflow tasks and activities, enhancing performance and resource management.
2025-07-10 16:28:15 -03:00
vitor-aignosi
50e6479c49 SIENTIAPDE-1110
Refactor notification handling in Gates and OPC activities to use send_notification method with metadata integration, enhancing error reporting and traceability.
2025-07-04 15:19:14 -03:00
vitor-aignosi
58216a91ce SIENTIAPDE-1110
Enhance OpcRepository write_data method to set SourceTimestamp using individual datetime components, improving precision in timestamping.
2025-06-27 17:07:33 -03:00
vitor-aignosi
d2e4561dfd SIENTIAPDE-1110
Enhance OpcRepository write_data method to include SourceTimestamp using DateTime, improving data accuracy and traceability.
2025-06-27 17:03:59 -03:00
vitor-aignosi
80ad2d54ad SIENTIAPDE-1110
Refactor Gates and OpcRepository for improved logging and error handling. Removed debug statement in Gates and enhanced disconnect method in OpcRepository to log disconnection status and handle exceptions.
2025-06-27 15:52:33 -03:00
vitor-aignosi
90c6beb673 SIENTIAPDE-1110
Refactor logging in OpcRepository to consistently use 'schedule_name' from metadata for improved error reporting and traceability.
2025-06-27 12:31:23 -03:00
vitor-aignosi
fd9d933931 SIENTIAPDE-1110
Update OPC activity to utilize custom logger in write_data method, improving error handling and traceability.
2025-06-27 12:27:40 -03:00
vitor-aignosi
566818b308 SIENTIAPDE-1110
Refactor logging in OPC and OpcRepository to utilize custom logging methods, enhancing error handling and traceability with metadata integration.
2025-06-27 12:24:15 -03:00
vitor-aignosi
119decac16 SIENTIAPDE-1110
Refactor OPC activity and OpcRepository to include metadata parameter in write_data methods, improving error handling and logging capabilities for better traceability.
2025-06-27 11:05:47 -03:00
vitor-aignosi
f692e23a28 SIENTIAPDE-1110
Update connectors_config to use dynamic OPC_ID as key for configuration, enhancing flexibility in OPC setup.
2025-06-27 10:49:49 -03:00
vitor-aignosi
a1b7d8e024 SIENTIAPDE-1110
Enhance logging in OPC activity by adding debug statements for output configuration and server details to improve traceability.
2025-06-27 10:45:39 -03:00
vitor-aignosi
cb8ffd57c0 SIENTIAPDE-1110
Fixes and tries
2025-06-27 10:44:20 -03:00
vitor-aignosi
ce69b0839f SIENTIAPDE-1110
SIENTIAPDE-1110 Refactor OPC activity to use server IDs instead of names, update values.yaml for OPC_ID, and enhance OpcRepository initialization for improved clarity and consistency.
2025-06-27 10:37:06 -03:00