Commit Graph

350 Commits

Author SHA1 Message Date
Italo-ap
d2e5e8ce93 Merge pull request #34 from Aignosi/release-manualgpr
Enhance Release Workflow with Manual Triggers and Version Input
2026-01-15 16:55:41 -03:00
vitor-aignosi
0032f88397 Enhance release workflow to support manual triggers and version input. The release job now activates on both merged pull requests and manual dispatch, allowing for version specification during releases. 2026-01-15 16:53:22 -03:00
Matheus Demoner
9feff0fe8b Merge pull request #31 from Aignosi/fix/release
Trigger Release Pipeline
2026-01-09 15:02:22 -03:00
vitor-aignosi
79cb685f80 Alteração qualquer para gerar a release 2026-01-09 14:58:50 -03:00
Matheus Demoner
33874ea1fb Merge pull request #30 from Aignosi/feature/SIENTIAPDE-1273
SIENTIAPDE-1273: Refactor Data Handling, Enhance Security Analysis, and Update Dependencies
2025-11-24 09:09:36 -03:00
vitor-aignosi
894d39faa4 SIENTIAPDE-1273
Refactor import statements in worker.py for improved organization

- Moved the import of the os module to the appropriate section, enhancing clarity and consistency in the import structure.
2025-11-24 09:06:00 -03:00
vitor-aignosi
2a451da976 SIENTIAPDE-1273
Refactor imports in opc.py to improve code clarity

- Moved the import of Hashable from collections.abc to the appropriate section, enhancing readability and organization of imports.
2025-11-19 18:31:52 -03:00
vitor-aignosi
3311409885 SIENTIAPDE-1273
Update sientia-mlops-library dependency to version 0.40.6 and refactor get_prediction_data method calls for improved readability in model_repository.py and test_model_repository.py.
2025-11-19 14:54:50 -03:00
vitor-aignosi
684bc9fb31 SIENTIAPDE-1273
Enhance prediction data retrieval in MLFlowRepository by adding predict_flavor parameter

- Updated get_prediction_data method to accept a predict_flavor argument, allowing for different prediction model handling.
- Adjusted calls to get_prediction_data throughout the codebase to include the new parameter.
- Added new test cases to validate behavior for different predict_flavor values, ensuring robust functionality.
2025-11-19 13:26:08 -03:00
vitor-aignosi
8f6a3cd93d SIENTIAPDE-1273
Enhance resource management and configuration in Laborious worker

- Updated `values.yaml` to define resource limits and requests for better performance tuning.
- Modified environment variables in `worker.py` to support resource-based scaling and improved task queue management.
- Introduced new functions for creating resource tuners and poller behaviors, enhancing scalability and efficiency in handling workloads.
2025-11-19 11:53:50 -03:00
vitor-aignosi
7e4e048ca3 SIENTIAPDE-1273
Update sientia-mlops-library dependency to version 0.40.5 and fix SQL interval formatting in Drift and SimpleMetrics workflows for improved query accuracy.
2025-11-19 08:47:48 -03:00
vitor-aignosi
388685df6e SIENTIAPDE-1273
Update image tag to 1.1.2 in values.yaml and refactor prediction data sorting in model_repository.py for improved clarity and consistency.
2025-11-18 09:16:42 -03:00
vitor-aignosi
6ae83d90be SIENTIAPDE-1273
Update conftest.py to add a blank line for improved readability and code style consistency.
2025-11-18 08:59:43 -03:00
vitor-aignosi
ffb829e0cb SIENTIAPDE-1273
Refactor data handling in Laborious workflows to enhance clarity and compatibility

- Improved data validation and formatting in `gates.py`.
- Streamlined model transformation management in `mlflow.py`.
- Enhanced export functionality in `format_and_export_prediction.py` for better data handling flexibility.
- Expanded test coverage for new features and improved documentation in `README.md`.
2025-11-18 08:49:40 -03:00
vitor-aignosi
24da0c7b61 Merge branch 'main' into feature/SIENTIAPDE-1273 2025-11-18 08:34:57 -03:00
vitor-aignosi
07dc612116 SIENTIAPDE-1273
Enhance data handling and export processes in Laborious workflows

- Updated `gates.py` to improve data quality validation, filtering, and formatting operations, including enhanced metrics recording.
- Refined `mlflow.py` to better manage model transformations and reference data retrieval from MLflow Model Registry.
- Enhanced `format_and_export_prediction.py` to support separate export of transformed data, improving flexibility in data handling.
- Added comprehensive test coverage for new functionalities, including transformed data formatting and retrain report generation.
- Improved documentation in `README.md` to reflect changes in activities and workflows, ensuring clarity on data processing and export paths.
2025-11-17 16:52:33 -03:00
vitor-aignosi
a88a15c60a SIENTIAPDE-1273
SIENTIAPDE-1273
Enhance security analysis and SQL injection handling

- Added skip for potential SQL injection false positives in Bandit configuration.
- Updated validate.sh to use the pyproject.toml configuration for Bandit security analysis.
- Refactored code to replace ensure_dataframe utility with direct DataFrame usage in multiple activities, improving clarity and reducing dependencies.
- Removed the deprecated dataframe_utils module to streamline the codebase.
2025-11-17 16:04:54 -03:00
vitor-aignosi
1014c33dd9 SIENTIAPDE-1273
Fix data size calculation in ModelMetrics class to use target_data.shape[0] for improved accuracy in metrics processing.
2025-11-17 11:03:27 -03:00
vitor-aignosi
59d3c26c71 SIENTIAPDE-1273
Update execution count in tests notebook and add data shape output for improved clarity in data handling.
2025-11-17 10:57:55 -03:00
vitor-aignosi
019b46009a SIENTIAPDE-1273
Refactor data size calculation in ModelMetrics class to use shape method for improved accuracy. Changed from using len(target_data) to data.shape[0] for better clarity in data handling.
2025-11-17 10:56:58 -03:00
vitor-aignosi
4563ffecac SIENTIAPDE-1273
Update sientia-dataops-library dependency version to 1.6.1 and refactor return types in Gates class methods for improved type clarity. Changed return types from dict[str, Any] to dict for better compatibility with downstream systems.
2025-11-17 10:45:13 -03:00
vitor-aignosi
c9b1ddfd15 SIENTIAPDE-1273
Refactor data export in Drift, SimpleMetrics, and FormatAndExportPrediction workflows to improve data handling. Changed the export format from a list of dictionaries to direct objects for enhanced clarity and compatibility with downstream systems.
2025-11-17 10:38:44 -03:00
vitor-aignosi
08f9522695 SIENTIAPDE-1273
Refactor data export in MinimalRetrain workflow to improve structure. Changed the export format from a list of dictionaries to a direct report object for enhanced clarity and compatibility with downstream systems.
2025-11-17 10:36:17 -03:00
vitor-aignosi
91580f8255 SIENTIAPDE-1273
Refactor return type of get_reference_data method in MLFlow class to improve type specificity. Changed from a list of dictionaries with Hashable keys to a generic list of dictionaries for enhanced clarity in data handling.
2025-11-17 10:25:30 -03:00
vitor-aignosi
46fe88f69e SIENTIAPDE-1273
Refactor return types in ModelMetrics class methods to enhance type clarity. Updated calculate_drift and calculate_simple_metrics methods to return lists of dictionaries instead of generic lists, improving type specificity for better data handling.
2025-11-17 10:14:47 -03:00
vitor-aignosi
a7ab8ffe49 SIENTIAPDE-1273
Refactor return type of calculate_drift method in ModelMetrics class to improve compatibility. Changed from a list of dictionaries to a generic list for enhanced flexibility in data handling.
2025-11-17 10:05:57 -03:00
vitor-aignosi
c8b809f189 SIENTIAPDE-1273
Update dependencies and refactor data handling in various modules

- Updated sientia-dataops-library dependency version from 1.5.3 to 1.5.4 in requirements files.
- Updated sientia-mlops-library dependency version from 0.39.0 to 0.40.2 in requirements files.
- Refactored return types in Gates, MLFlow, and ModelMetrics classes to return dictionaries instead of DataFrames for improved compatibility with downstream systems.
- Removed the temporal_codec module as it is no longer needed for DataFrame serialization.
- Adjusted data handling in the Drift workflow to ensure proper data structure is maintained.
2025-11-17 09:58:55 -03:00
vitor-aignosi
d2b365a34d SIENTIAPDE-1273
Refactor data handling in various modules to ensure DataFrame consistency

- Replaced direct DataFrame instantiation with `ensure_dataframe` utility in Gates, MLFlow, OPC, and ModelMetrics classes to standardize data handling.
- Updated return types in several asynchronous methods to return DataFrames instead of dictionaries for improved usability.
- Adjusted data export processes in workflows to convert DataFrames to dictionaries with `to_dict(orient='records')` for compatibility with downstream systems.
2025-11-14 16:55:00 -03:00
vitor-aignosi
4191f68d3b SIENTIAPDE-1273
Refactor ModelMetrics return format and correct import name in worker module

- Changed the return format of the metrics data in ModelMetrics from a dictionary to a list for improved usability.
- Corrected the import statement for SimpleMetrics in the worker module to ensure consistency and clarity.
2025-11-14 16:06:51 -03:00
vitor-aignosi
64f0747e8e SIENTIAPDE-1273
Update version and enhance metrics calculation in Laborious system

- Updated image tag in values.yaml from 1.1.0 to 1.1.1.
- Modified GITHUB_BRANCH environment variable for consistency.
- Added a new method `calculate_simple_metrics` in model_metrics.py to compute various model performance metrics including RMSE, MSE, MAE, and R2.
- Integrated the new metrics calculation into the worker setup, allowing for concurrent processing of simple metrics.
- Updated tests to cover the new metrics calculation functionality, ensuring comprehensive validation of the implementation.
2025-11-14 15:43:28 -03:00
vitor-aignosi
66193cea15 SIENTIAPDE-1273
Refactor Drift class to improve target name handling

- Extracted target name from model configuration in the Drift class for better clarity and maintainability.
- Updated test cases to reflect changes in input data structure, ensuring consistency in target name retrieval.
2025-11-14 08:47:39 -03:00
vitor-aignosi
b68674fe64 SIENTIAPDE-1273
Enhance MLFlowRepository and Activities classes with new methods and metrics

- Added `check_artifact_exists` method to MLFlowRepository for verifying artifact presence in the MLflow Model Registry.
- Implemented `get_prediction_data` method in MLFlowRepository to retrieve prediction data from models.
- Updated Activities class to integrate ModelMetrics for improved metrics handling.
- Enhanced tests for artifact existence checks and prediction data retrieval, ensuring robust coverage for new functionalities.
- Updated various workflows to include `transform_table_name` in input data for better data handling.
2025-11-13 16:40:23 -03:00
vitor-aignosi
6ac0f38d59 SIENTIAPDE-1273
Update requirements and enhance metrics and data handling

- Updated the sientia-dataops-library dependency version in requirements.txt to 1.5.3.
- Added new metrics for model analysis, including lag, count, and error count in metrics.py.
- Implemented a new method for formatting transformed data in gates.py.
- Enhanced MLFlowRepository with methods to load artifact dataframes and calculate model metrics, including drift and performance metrics.
- Updated the prediction process to handle transformed data and ensure proper execution of related activities in format_and_export_prediction.py and prediction_process.py.
2025-11-11 16:50:22 -03:00
vitor-aignosi
ee854ffcfe Merge pull request #29 from Aignosi/feature/SIENTIAPDE-1325-adicionar-metricas-especificas-de-operacoes-externas
SIENTIAPDE-1325: Enhance OPC metrics and monitoring with server name and URL
2025-11-10 10:11:44 -03:00
vitor-aignosi
0c59a7def8 SIENTIAPDE-1325
Refactor OPC data handling in opc_repository.py to improve code clarity. Updated commented-out code for SourceTimestamp to include NOSONAR annotations, ensuring better code quality checks.
2025-11-10 09:53:06 -03:00
vitor-aignosi
0de30d85a8 SIENTIAPDE-1325
Update logging in MLFlowRepository and OpcRepository to use unified logging methods

- Refactored logging calls in MLFlowRepository to replace `self.logger.info` and `self.logger.debug` with `self.info` and `self.debug` for consistency.
- Updated connection logging in OpcRepository to format the connection message properly.
- Adjusted test cases to reflect changes in logging behavior and ensure proper assertions.
2025-11-10 09:40:12 -03:00
vitor-aignosi
03dc0978b8 SIENTIAPDE-1325
Enhance OPC connection metrics by emitting total connections metric upon connection attempt. This change ensures accurate tracking of connection attempts in the OpcRepository class.
2025-11-07 09:57:43 -03:00
vitor-aignosi
c41c11b46f SIENTIAPDE-1325
Update OPC metric emissions to include server URL in total connections metric
2025-11-07 09:47:27 -03:00
vitor-aignosi
b7a15999ab SIENTIAPDE-1325
Refactor OPC class to remove unused opc_servers attribute and streamline initialization. Update OpcRepository to consolidate server name tags for metric emissions.
2025-11-07 09:44:01 -03:00
vitor-aignosi
fe82e52f70 SIENTIAPDE-1325
Update OPC connection logging to include server name in connection message
2025-11-07 09:26:03 -03:00
vitor-aignosi
d2f73658c9 SIENTIAPDE-1325
Update OPC connection logging to include server name in success message
2025-11-07 09:25:34 -03:00
vitor-aignosi
8d402fb156 SIENTIAPDE-1325
SIENTIAPDE-1325 Add OPC server name configuration and update repository handling

- Introduced a new environment variable `OPC_SERVER_NAME` in values.yaml with a default value.
- Updated the OPC class to include `server_name` when initializing OpcRepository.
- Enhanced the configuration builder to retrieve `OPC_SERVER_NAME` from the environment.
- Adjusted OpcRepository to store and utilize the `server_name` for metric emissions.
2025-11-07 09:20:48 -03:00
vitor-aignosi
2245baae62 SIENTIAPDE-1325
Update OPC metric emission to include server URL in opc_repository.py
2025-11-07 08:46:11 -03:00
vitor-aignosi
4136c116da SIENTIAPDE-1325
Refactor OPC metrics in metrics.py and opc_repository.py

- Replaced existing OPC connection metrics with new metrics for total connections and failed connections.
- Updated the OPC connection status metric to include server URL and adjusted corresponding metric emissions in opc_repository.py.
2025-11-07 08:37:08 -03:00
vitor-aignosi
507aded950 SIENTIAPDE-1325
Update image tag and enhance OPC metrics tracking

- Bumped image tag from "1.0.1" to "1.1.0" in values.yaml.
- Added new metrics for OPC connection count and error count in metrics.py.
- Refactored OPC connection handling in opc_repository.py to emit new metrics for connection status, count, and errors.
2025-11-06 16:59:02 -03:00
vitor-aignosi
1695df70ae SIENTIAPDE-1325
Enhance metrics handling in Gates and MLFlow classes

- Added checks for `None` response times before emitting OPC writing metrics in the Gates class to prevent unnecessary metric emissions.
- Updated the MLFlow class to conditionally sort and drop duplicates based on the presence of the 'created_at' column, ensuring robustness in data processing.
- Adjusted corresponding tests to validate the new behavior in both classes.
2025-11-05 16:30:51 -03:00
vitor-aignosi
a3da800cab SIENTIAPDE-1325
Refactor monitoring and metrics integration across various components

- Removed coverage options from `pyproject.toml`.
- Updated prediction metrics in `README.md` to replace `pipeline_name` with `workflow_name`.
- Upgraded `sientia-dataops-library` dependency version in `requirements-light.txt` and `requirements.txt`.
- Enhanced metrics handling in `laborious` activities, including `Activities`, `Gates`, `MLFlow`, and `OPC`, to utilize a new `MetricsController`.
- Refactored metric emission methods to improve clarity and consistency across the codebase.
- Updated tests to reflect changes in metrics handling and ensure proper functionality.
2025-11-04 16:49:10 -03:00
Matheus Demoner
77550d49a6 Merge pull request #28 from Aignosi/fix/SIENTIAPDE-1314-ajustes-nas-camadas-de-monitoramento-do-sientia
SIENTIAPDE-1314: Improve OPC Metrics and Update Prediction Workflow Execution
2025-10-27 15:35:42 -03:00
vitor-aignosi
67af03ee94 SIENTIAPDE-1314
Enhance thread safety in MLFlowRepository model caching

- Introduced a reentrant lock to synchronize access to the model cache, ensuring thread safety during cache checks and updates.
- Updated the cache management logic to acquire the lock when checking for existing models and when updating the cache after downloading a new model.
- Reduced the maximum cached workflows in the worker configuration for improved resource management.
2025-10-27 13:29:01 -03:00
vitor-aignosi
1cbf356d0c SIENTIAPDE-1314
Refactor model cache deletion in MLFlowRepository

- Updated the model cache deletion logic to remove the entire 'target' key instead of just the 'model' subkey, streamlining the cache management process.
2025-10-27 12:28:17 -03:00