Commit Graph

413 Commits

Author SHA1 Message Date
vitor-aignosi
62b885afae SIENTIAPDE-1712
SIENTIAPDE-1712 Add last_timestamp parameter to MLFlow and Gates activities for enhanced tracking

- Introduced last_timestamp parameter in the MLFlow and Gates classes to improve tracking of data processing times.
- Updated MinioDataFramePayload to handle last_timestamp, ensuring it defaults to the maximum timestamp from the dataframe if not provided.
2026-03-23 09:26:49 -03:00
vitor-aignosi
2fa7506075 SIENTIAPDE-1712
SIENTIAPDE-1712 Add timestamp column to processed data in MLFlow and improve dataframe validation in MinioDataFramePayload

- Added a 'timestamp' column to the processed data in the MLFlow class for better tracking of data entries.
- Updated the validation check in MinioDataFramePayload to handle None values for the dataframe more explicitly.
2026-03-23 08:35:28 -03:00
vitor-aignosi
e1d1e3d43d SIENTIAPDE-1712
Refactor imports in gates.py and mlflow.py for improved organization

- Removed unnecessary import statement in mlflow.py and re-added it in a more appropriate location.
- Cleaned up the workflow metadata assignment in gates.py for better readability.
2026-03-23 08:06:01 -03:00
vitor-aignosi
2979f2dd5a SIENTIAPDE-1712
Update environment variables in values.yaml and enhance metric labels in metrics.py

- Changed POSTGRES_USER and POSTGRES_PASSWORD values in values.yaml for improved security.
- Added 'runtime' label to metrics in metrics.py for better environment identification.
- Updated CORE_LABELS to include 'runtime' for consistency across metrics.
- Modified type hint for data parameter in PredictionProcess to use a dictionary for better clarity.
- Adjusted tests to reflect changes in core labels and MinIO configuration.
2026-03-20 16:59:04 -03:00
vitor-aignosi
e35e27bfb2 SIENTIAPDE-1712
SIENTIAPDE-1712 Update type hints in PredictionProcess to improve clarity and enforce data structure consistency. Changed `data` parameter to a dictionary type and updated the way `last_timestamp` is accessed.
2026-03-20 16:00:11 -03:00
vitor-aignosi
52bca3f09d SIENTIAPDE-1712
Fix type hint in from_dict method of MinioDataFramePayload class for improved clarity and compatibility with type checking.
2026-03-20 15:53:54 -03:00
vitor-aignosi
67942c45e0 SIENTIAPDE-1712
Refactor MinioDataFramePayload usage across activities

- Updated instances of MinioDataFramePayload initialization in Gates, MLFlow, and Storage classes to use the new from_dict method for better data reconstruction from dictionaries.
- Enhanced the PredictionProcess workflow to utilize the updated payload handling.
- Added passthrough fixtures in tests to accommodate the new from_dict method for consistent testing behavior.
2026-03-20 15:52:04 -03:00
vitor-aignosi
8789e6693f SIENTIAPDE-1712
Remove `query_to_minio` method from Storage class and update worker activities to eliminate its usage. This change streamlines the codebase by removing unused functionality related to MinIO queries.
2026-03-20 15:27:55 -03:00
vitor-aignosi
57b0005c94 SIENTIAPDE-1712
Update MinIO configuration by changing access key in values.yaml and removing region_name references in multiple files to streamline configuration.
2026-03-20 15:06:23 -03:00
vitor-aignosi
18718418fc SIENTIAPDE-1712
Update MinIO configuration in values.yaml and activities.py; add secure option in connectors_config.py
2026-03-20 14:59:47 -03:00
vitor-aignosi
add3629272 SIENTIAPDE-1712
Update liveness and readiness probe initial delays in values.yaml; change GITHUB_BRANCH to feature/SIENTIAPDE-1712; refactor MinioRepository initialization in activities.py
2026-03-20 14:37:26 -03:00
vitor-aignosi
d43f08d272 SIENTIAPDE-1712
Enhance README and Implement Drift Detection and Metrics Workflows

- Added new sections in README for Drift Workflow and Simple Metrics Workflow, detailing their execution flows and functionalities.
- Introduced `drift.py` for data drift detection, comparing current data against reference datasets.
- Added `simple_metrics.py` for calculating regression metrics (RMSE, MSE, MAE, R²).
- Updated `values.yaml` to include configuration for MinIO retention hours and offload threshold.
- Refactored `minio_dataframe_payload.py` to use the new offload threshold environment variable.
- Adjusted tests to reflect changes in environment variable handling for MinIO offload threshold.
2026-03-20 09:22:08 -03:00
vitor-aignosi
5d0d049082 SIENTIAPDE-1712
Remove code validation script and refactor imports in activities and workflows

- Deleted the `validate.sh` script, which was responsible for running code quality checks.
- Cleaned up import statements in `activities.py`, `gates.py`, `mlflow.py`, and `storage.py` by removing unused imports and organizing them.
- Refactored initialization methods in `MinioManager` and `MLFlow` classes for improved readability.
- Updated various workflows to ensure compatibility with the new structure and removed unnecessary comments.
- Enhanced test cases to accommodate changes in the activities and workflows, ensuring proper mocking of dependencies.
2026-03-20 09:14:16 -03:00
vitor-aignosi
981ac700d4 SIENTIAPDE-1712
Implement MinIO Offload and Retention Features

- Added configuration options for MinIO retention hours and offload threshold in README.
- Introduced MinIO payload offloading for large DataFrame-derived payloads, storing them as parquet files.
- Updated activities to utilize MinIO for data loading and cleanup, including new methods for offloading and retention management.
- Refactored existing activities to integrate MinIO functionality, ensuring compatibility with previous workflows.
- Removed the legacy MinioRepository class, consolidating MinIO operations under a new manager structure.
- Updated requirements to use the latest version of the sientia-dataops-library.
2026-03-19 17:29:43 -03:00
vitor-aignosi
9dc3cb3ba0 Merge pull request #37 from Aignosi/fix/SIENTIAPDE-1478
Enhance API: Add optional operation_type to get_core_labels
2026-02-11 11:04:25 -03:00
vitor-aignosi
3a15ed8058 SIENTIAPDE-1478
Rename get_core_labels method to get_pi_web_api_core_labels in API class for clarity and consistency with PI Web API integration.
2026-02-11 10:29:56 -03:00
vitor-aignosi
d770094a28 Merge branch 'main' into fix/SIENTIAPDE-1478 2026-02-11 10:12:33 -03:00
vitor-aignosi
c2864d3806 SIENTIAPDE-1478
Enhance API class with optional operation_type in get_core_labels method

- Added a new method get_core_labels to the API class that generates core labels for metrics.
- Introduced an optional operation_type parameter to control the inclusion of the operation_type key in the returned labels.
- Maintained compatibility with the base implementation while providing flexibility for metrics without the operation_type label.
2026-02-11 10:11:28 -03:00
Matheus Demoner
524bc2e5c4 Merge pull request #36 from Aignosi/fix/SIENTIAPDE-1478
SIENTIAPDE-1478: API Class Improvements, Test Notebook Refinements, and Config Update
2026-01-29 11:00:34 -03:00
vitor-aignosi
ce7632ba95 Merge branch 'main' into fix/SIENTIAPDE-1478 2026-01-29 10:04:03 -03:00
vitor-aignosi
33db5fcb69 SIENTIAPDE-1478
SIENTIAPDE-1478 Update tests.ipynb to adjust execution counts and enhance plotting limits

- Modified execution counts for code cells to ensure consistency.
- Updated plotting limits to account for both actual values and predictions, improving data visualization accuracy.
2026-01-29 10:00:34 -03:00
vitor-aignosi
9549179d93 SIENTIAPDE-1478
SIENTIAPDE-1478 Update GITHUB_BRANCH in values.yaml to reflect the fix for the issue
2026-01-27 13:06:22 -03:00
vitor-aignosi
cf0478d9a5 SIENTIAPDE-1478
Enhance API class with default headers for JSON requests

- Added a headers configuration to the API class to specify default Content-Type, Accept, x-requested-with, and User-Agent for JSON requests.
2026-01-27 13:04:18 -03:00
vitor-aignosi
49481253ca SIENTIAPDE-1478
SIENTIAPDE-1478 Update tests.ipynb to enhance data loading and visualization

- Refactored data loading functions to improve clarity and efficiency.
- Updated plotting functionality to include additional data series and improved axis handling.
- Adjusted execution counts and output formatting for consistency with new data structures.
2026-01-27 13:03:31 -03:00
vitor-aignosi
bda479af5f Merge pull request #35 from Aignosi/feature/SIENTIAPDE-1478
Feature: PI Web API Integration, Enhanced PredictionsBatch E2E Tests, and System Refinements
2026-01-23 13:48:03 -03:00
vitor-aignosi
ab5e91fa07 Update laborious/activities/api.py
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
2026-01-23 13:13:25 -03:00
vitor-aignosi
24859eeeb4 SIENTIAPDE-1478
Fix missing newline at end of file in api.py
2026-01-23 10:01:23 -03:00
vitor-aignosi
0ba43aa955 SIENTIAPDE-1478
SIENTIAPDE-1478 Update tests.ipynb with new execution counts, modify output values and timestamps, and enhance plotting functionality

- Adjusted execution counts for code cells to maintain consistency.
- Updated output values and timestamps in test results to reflect new data.
- Enhanced plotting functionality by adding a second subplot for additional data visualization.
2026-01-23 09:46:07 -03:00
vitor-aignosi
1478680825 SIENTIAPDE-1478
Update release.yml to rename version input to release_version for clarity
2026-01-22 13:56:32 -03:00
vitor-aignosi
ecbcd67597 SIENTIAPDE-1478
Refactor PI Web API response handling in tests

- Updated test cases in test_api.py to handle response data as lists instead of dictionaries for consistency with the API's expected output format.
- Adjusted mock responses to reflect the new structure, ensuring tests accurately simulate API behavior.
- Enhanced clarity in test descriptions and improved overall test coverage for response processing scenarios.
2026-01-22 13:48:05 -03:00
vitor-aignosi
0739f7e2b3 SIENTIAPDE-1478
Update sientia-dataops-library dependency version from 1.8.1 to 1.8.2 in requirements.txt and modify API class to accept a list of response data for PI Web API integration.
2026-01-22 13:41:02 -03:00
vitor-aignosi
fdb866adcf SIENTIAPDE-1478
Update sientia-dataops-library dependency version from 1.8.0 to 1.8.1 in requirements.txt
2026-01-22 10:52:04 -03:00
vitor-aignosi
53213bf7f1 SIENTIAPDE-1478
Fix spelling errors in poller behavior parameters in prepare_worker.py and remove redundant endpoint references in test_api.py
2026-01-21 15:42:59 -03:00
vitor-aignosi
276fe6f623 SIENTIAPDE-1478
SIENTIAPDE-1478 Update tests.ipynb execution counts, modify timestamps, and enhance API class for PI Web API integration

- Adjusted execution counts in tests.ipynb for consistency.
- Updated timestamps in test outputs to reflect new data.
- Refactored API class to streamline data writing to PI Web API by removing redundant endpoint handling.
2026-01-21 15:34:58 -03:00
vitor-aignosi
9d7268aa0e SIENTIAPDE-1478
Add write_pi_web_api_data activity to main workflow in worker.py
2026-01-20 16:32:00 -03:00
vitor-aignosi
98fdb83341 SIENTIAPDE-1478
Update image tag in values.yaml from "1.1.1" to "1.1.2" for version increment.
2026-01-19 12:27:23 -03:00
vitor-aignosi
23e41ac097 SIENTIAPDE-1478
Add a blank line before invalid_cases in test_model_repository.py for improved readability
2026-01-19 09:58:38 -03:00
vitor-aignosi
33ee1e02cf SIENTIAPDE-1478
Update sonar-project.properties to exclude all worker files from coverage and modify execution counts and timestamps in tests.ipynb. Add a new test for empty DataFrame handling in test_model_repository.py.
2026-01-19 09:55:46 -03:00
vitor-aignosi
179716d770 Merge branch 'main' into feature/SIENTIAPDE-1478 2026-01-19 08:22:47 -03:00
vitor-aignosi
69b2f93ab2 SIENTIAPDE-1478
Refactor validation script and improve logging in API and model repository

- Updated validation script to include 'e2e/' directory in code formatting and linting checks.
- Enhanced error logging in API class to improve readability of error messages.
- Refactored debug logging in model repository for better structured output.
- Cleaned up import statements in various files for improved organization.
2026-01-16 16:47:33 -03:00
vitor-aignosi
241f283724 SIENTIAPDE-1478
Enhance end-to-end tests for PredictionsBatch workflow scenarios

- Introduced mock repositories for PI Web API and OPC operations to improve test coverage.
- Updated test scenarios to handle partial write errors for PI Web API and OPC.
- Refactored existing tests to assert correct behavior under various error conditions.
- Enhanced logging and error handling in API and OPC activities to provide clearer feedback on failures.
- Removed outdated integration test file to streamline test suite.
2026-01-16 16:41:36 -03:00
vitor-aignosi
6b9bb38968 SIENTIAPDE-1478
Enhance end-to-end tests for PredictionsBatch workflow scenarios

- Updated scenario descriptions and assertions for error handling in prediction exports.
- Introduced new test cases for handling exports with only OPC or PI Web API.
- Refactored existing tests to improve clarity and maintainability, including dynamic data insertion.
- Adjusted workflow input configurations to better reflect expected behaviors for various error scenarios.
2026-01-16 10:38:08 -03:00
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
vitor-aignosi
0cd6ae660a SIENTIAPDE-1478
Refactor end-to-end tests for PredictionsBatch workflow

- Updated the `assert_continue` function to accept dynamic prediction confidence and comments.
- Simplified test scenarios by introducing helper functions for data insertion.
- Enhanced test cases to verify behavior for CONTINUE, STOP, and REPEAT policies at transform gates.
- Improved clarity and maintainability of test structure.
2026-01-15 16:17:47 -03:00
vitor-aignosi
b5b86db10c SIENTIAPDE-1478
SIENTIAPDE-1478
Enhance end-to-end tests for PredictionsBatch workflow

- Added new test scenarios for input and transform gates handling CONTINUE, STOP, and REPEAT policies.
- Implemented sample data insertion functions for testing various prediction outcomes.
- Updated existing tests to verify behavior under different input conditions and response validations.
- Refactored test structure for clarity and maintainability.
2026-01-15 15:46:05 -03:00
vitor-aignosi
85e69a09e0 SIENTIAPDE-1478
Update replicaCount in values.yaml from 2 to 1 to adjust deployment scaling.
2026-01-15 11:23:41 -03:00
vitor-aignosi
6a69687fd5 SIENTIAPDE-1478
Enhance MLFlow logging and add skip_transform option in MLFlowRepository

- Updated logging in mlflow.py to output processed input data as CSV.
- Introduced skip_transform parameter in MLFlowRepository to conditionally bypass data transformation.
- Improved logging in model_repository.py to display data in a more structured format (to_dict) for predictions and transformations.
2026-01-15 10:55:48 -03:00
vitor-aignosi
966d4f8193 SIENTIAPDE-1478
Update Python version in tests.ipynb to 3.11.14 and increment image tag in values.yaml to 1.1.1 for consistency with deployment requirements.
2026-01-15 10:38:07 -03:00
vitor-aignosi
63017754a8 SIENTIAPDE-1478
Update coverage source in pyproject.toml, add testcontainers for PostgreSQL in requirements-dev.txt, increment image tag and adjust probe delays in values.yaml, and refine condition checks in format_and_export_prediction.py and mlflow.py. Additionally, enhance test coverage in test_gates.py.
2026-01-14 16:01:03 -03:00