Commit Graph

99 Commits

Author SHA1 Message Date
vitor-aignosi
b2458ec354 refactor: simplify load_html_from_file function and add debug prints in Reports class
- Removed exception handling in load_html_from_file for cleaner code.
- Added debug print statements in the Reports class to log output directory, report path, and base path for better traceability during report generation.
2026-04-16 14:17:54 -03:00
vitor-aignosi
8d4dc65aaa feat: enhance report generation with target name and content injection
- Added target_name parameter to Reports class for improved report context.
- Updated inject_content function to ensure proper handling of HTML sections.
- Modified DataManagerRepository to join predictions with training and validation data for accurate report generation.
2026-04-16 10:26:42 -03:00
vitor-aignosi
1e05ebe147 feat: add experiment_name to TrainModelResult and update training logic
- Introduced experiment_name parameter in TrainModelResult to enhance tracking of training experiments.
- Updated the Training class to utilize run_name and experiment_name for improved MLflow run management.
2026-04-16 09:43:39 -03:00
vitor-aignosi
c75a5921f3 feat: add run_name to TrainModelResult for enhanced tracking
- Introduced run_name parameter in TrainModelResult to improve identification of training runs based on model type, name, and experiment run ID.
2026-04-16 09:34:36 -03:00
vitor-aignosi
e658c3036f feat: add timezone handling for DataFrame index
- Implemented _set_timezone_on_index method to ensure DataFrame indices are set to UTC if not already timezone-aware.
- Updated training and validation DataFrame processing to include timezone configuration for improved data consistency.
2026-04-16 09:20:04 -03:00
vitor-aignosi
3bee743cfd feat: enhance training and regression metrics logging
- Added debug logging for data preparation, transformation, and prediction steps in the Training class to improve traceability.
- Updated compute_regression_metrics method to include metadata for better debugging and validation of index alignment between true and predicted values.
2026-04-13 15:18:42 -03:00
vitor-aignosi
388d4c95e4 chore: update configuration and imports for improved functionality
- Updated image tag in values.yaml from "1.0.0" to "1.0.2" for the latest version.
- Modified STORE_BASE_URL to include port 3000 for proper service access.
- Changed import from MinioRepository to MinioRepositorySync for synchronization support.
- Updated import from Postgres to PostgresSync to enhance experiment tracking capabilities.
- Renamed TRAIN_TASK_QUEUE from "train_model-single-queue" to "train_model-basic-queue" for clarity.
2026-04-13 14:57:06 -03:00
vitor-aignosi
4d761c15ac chore: remove sientia models module and relocate date format validation
- Deleted the sientia/models.py file, which contained the LinearRegressionModel and related functionality.
- Moved the frontend date format validation logic to train_model_params.py, ensuring a single source of truth for date formats.
2026-04-13 10:40:21 -03:00
vitor-aignosi
c0bef2d688 feat: update values.yaml and refactor cleanup paths
- Changed project name in values.yaml from "sientia-dataops-model-manager" to "sientia-model-manager".
- Added new environment variables for GitHub repository and branch configuration.
- Refactored cleanup paths to use a centralized REPORTS_TEMP_DIR constant for consistency.
- Updated runtime configurations and adjusted volume mounts for better resource management.
- Enabled SSH access for the model manager and disabled Grafana dashboard creation.
- Updated tests to reflect changes in directory paths and environment variable usage.
2026-04-09 16:37:36 -03:00
vitor-aignosi
526edcb50e feat: update training workflow and repository management
- Replaced synchronous MinIO repository calls with asynchronous counterparts in the Training class for improved performance.
- Enhanced logging throughout the training process to provide better insights into model metadata loading, parameter validation, and training execution.
- Updated the train_test_split function to enforce DataFrame input type, ensuring consistency in data handling.
- Removed the deprecated model_repository.py file to streamline the codebase.
- Adjusted cleanup schedule logic to improve error handling and logging during schedule reconciliation.
- Updated tests to reflect changes in the training workflow and repository interactions.
2026-04-09 12:09:52 -03:00
vitor-aignosi
0ae03b246f feat: update environment configuration and remove deprecated model serving
- Modified `.env.example` to set local defaults for PostgreSQL, MLflow, and MinIO configurations.
- Added MongoDB configuration parameters to the environment setup.
- Updated `README.md` to reflect changes in workflow input parameters and task queue naming conventions.
- Removed the `ModelServing` class to streamline the codebase, as it was deemed unnecessary.
- Adjusted `connectors_config.py` to align with new environment variable names and improve clarity.
- Updated tests to reflect changes in configuration handling and removed tests related to the deleted `ModelServing` class.
2026-04-07 16:58:50 -03:00
vitor-aignosi
c5cd382350 feat: enhance configuration and scheduling for cleanup processes
- Updated `.env.example` to include new environment variables for MinIO and PyPI configuration.
- Refactored `create_cleanup_schedule` to utilize runtime-specific task queues and improve schedule reconciliation logic.
- Enhanced `Activities` class to require a default bucket in MinIO configuration.
- Adjusted `requirements.txt` to specify version for `evidently`.
- Updated tests to reflect changes in schedule creation and configuration handling.
2026-04-07 12:57:29 -03:00
vitor-aignosi
09ee92f100 feat: enhance configuration and error handling in project setup
- Added new ignore rule for Ruff to allow temporary paths in tests.
- Introduced MyPy overrides for specific modules to ignore errors.
- Refactored `Cleanup` and `ExperimentTracking` classes to remove async keywords from methods, improving consistency in method signatures.
- Updated `Training` class methods to handle synchronous operations, enhancing performance and clarity.
- Adjusted `requirements.txt` to remove unnecessary Git dependency, streamlining project setup.
2026-04-07 10:25:17 -03:00
vitor-aignosi
6b1df7c3a7 feat: enhance training and experiment tracking functionality
- Updated `Activities` class to improve garbage collection handling.
- Enhanced error messaging in `ExperimentTracking` for better clarity on update failures.
- Refactored `Training` class to streamline exception handling and improve type hints.
- Introduced new methods in `TrainModelParams` for better handling of experiment run IDs and model metadata.
- Added functionality to extract model equations in `DataManagerRepository` for linear regression models.
2026-04-06 15:05:57 -03:00
vitor-aignosi
1352d1ac8f feat: enhance training model functionality and reporting
- Added `evidently` to requirements for improved model evaluation.
- Introduced `TrainModelResult` class with a `to_dict` method for better result handling.
- Updated `train_model` method to return a comprehensive training result, including run details.
- Enhanced `cleanup_run_directory` method in `DataManagerRepository` for improved resource management.
- Adjusted type hints in `TrainModel` for clarity and consistency.
2026-04-06 11:40:08 -03:00
vitor-aignosi
a8b926649a feat: enhance training reporting and directory management
- Added functionality to store run name and ID in the training results.
- Implemented report generation in the `DataManagerRepository`, including methods to create a run directory and generate comprehensive reports.
- Updated `TrainModelResult` to include `run_id` and `run_dir` attributes for better tracking of training sessions.
2026-04-06 10:38:24 -03:00
vitor-aignosi
18412958d2 refactor: remove MinIO repository references and streamline cleanup process
- Eliminated MinIO repository dependencies from the `Activities`, `Cleanup`, and `Training` classes.
- Updated the `cleanup_resources` method to focus on removing local temporary directories instead of handling MinIO file deletions.
- Adjusted the `TrainModel` class to pass the run directory for cleanup, enhancing resource management in the training workflow.
2026-04-06 09:30:38 -03:00
vitor-aignosi
d2bb588739 Merge branch 'main' into release/SIENTIAPDE-1645 2026-04-06 08:34:15 -03:00
vitor-aignosi
bf2b6b3888 feat: improve error handling and resource cleanup in training workflow
- Updated the `Training` class to raise `ModelTrainingError` on training failures for better error management.
- Enhanced the `run` method in `TrainModel` to return training results and ensure proper resource cleanup, including validation files.
- Refactored exception handling to prevent silent failures during resource cleanup and experiment run updates.
- Adjusted type hints for improved clarity and consistency in method signatures.
2026-04-06 08:26:42 -03:00
Bruno Domingues
cce350bfb1 SIENTIAPDE-1717: Remove FILE_DELETE_ERROR from ExperimentStatus enum and related tests. 2026-03-30 14:33:19 -03:00
Bruno Domingues
f5eb8d1e5b SIENTIAPDE-1717: Remove list_bucket_objects method from StorageRepository and its associated test. 2026-03-30 14:18:14 -03:00
Bruno Domingues
7a0961f29d SIENTIAPDE-1717: Remove MinIO cleanup functionality and associated components. This change streamlines the cleanup workflow to focus solely on local temporary directories, removes the ModelTrainingError exception, and updates related configurations, documentation, and tests. 2026-03-30 14:14:10 -03:00
vitor-aignosi
342a02d6f7 feat: enhance training workflow with model metadata loading and refactor data handling
- Introduced a new activity to load model metadata from the model store.
- Refactored training logic to utilize new model metadata and improved parameter handling.
- Updated the `TrainModelParams` class to include additional fields for model configuration.
- Replaced deprecated utility functions with a custom train-test split implementation.
- Removed unused utility functions and cleaned up the data manager repository.
- Adjusted experiment tracking to include model-specific metadata in notifications.
2026-03-24 14:39:28 -03:00
vitor-aignosi
cf5111e520 feat: integrate PluginStore and MinIO repository into model manager activities
- Added PluginStore integration for model management.
- Replaced StorageRepository with MinIORepository in Activities, Cleanup, and Training classes.
- Updated training logic to handle validation files and improved data management.
- Enhanced configuration for MinIO and PluginStore in connectors.
- Removed deprecated model repository and storage repository files.
- Updated environment variable handling for new configurations.
2026-03-11 17:35:05 -03:00
Bruno Domingues
41c4490cad SIENTIAPDE-1579: Fix SientiaMlException propagation in ModelServing.search_runs_by_name to correctly raise the exception with its message, resolving a TypeError. Enhance training test script to support scenario-specific CSV files for different test cases. Update search_runs_by_name return type hint and apply minor code formatting. 2026-02-19 21:13:41 -03:00
Kou Kinoshita
14f3fbadbe SIENTIAPDE-1579: Switched from replace logic to validation + mapping 2026-02-18 18:57:41 -03:00
Kou Kinoshita
e7e851dbb5 SIENTIAPDE-1579: Lint fix 2026-02-18 18:20:43 -03:00
Kou Kinoshita
5dab1ee576 SIENTIAPDE-1579?: removed duplicated method 2026-02-18 18:18:39 -03:00
Kou Kinoshita
665870320f SIENTIAPDE-1579: Updated tests and refactored apply filters method 2026-02-18 17:44:46 -03:00
Kou Kinoshita
43cbc31e10 SIENTIAPDE-1579: Lint fixes and formatting 2026-02-18 17:31:58 -03:00
Kou Kinoshita
54a47a1d96 SIENTIAPDE-1579: Added extra test files and support filters implementation 2026-02-18 14:16:21 -03:00
Kou Kinoshita
8b7bd81328 SIENTIAPDE-1579: Fixed data preprocessor 2026-02-18 11:14:27 -03:00
Kou Kinoshita
a4d94dd2ff SIENTIAPDE-1579: Added date format and convert methods 2026-02-13 18:41:46 -03:00
Bruno Domingues
df6bf1daba SIENTIAPDE-1430: Refactor static threshold calculation logic and enhance test coverage 2025-12-19 16:19:10 -03:00
Bruno Domingues
06571011f2 SIENTIAPDE-1430: Introduce static_threshold parameter for static window removal.
This parameter allows customizing the threshold (1-1000) used when rem_static_win is enabled, defaulting to 1 if null.
Updates include parameter definition, business rule validation, repository logic for passing the threshold, documentation in README.md and PIPELINE_PARAMS_CHANGELOG.md, and new unit and integration tests.
2025-12-19 15:44:18 -03:00
Bruno Domingues
7cbb7022e5 SIENTIAPDE-1430: Refactor DataPreprocessor date filtering, make rce_train radius optional, and introduce constants for model names. 2025-12-19 12:28:07 -03:00
Bruno Domingues
38fb9a9c53 SIENTIAPDE-1430: Remove verbose options and direct print statements from model, preprocessor, and report utilities. 2025-12-18 21:09:12 -03:00
Bruno Domingues
70067fd992 SIENTIAPDE-1430: Improve test coverage for LinearRegressionModel and DataPreprocessor. Added extensive new tests covering various methods, edge cases, and scenarios to enhance overall code coverage. 2025-12-18 18:41:03 -03:00
Bruno Domingues
06fd08dc70 SIENTIAPDE-1430: Introduce comprehensive integration testing with JSON-based scenarios and detailed README documentation. Enhance training workflow to support advanced model configurations, including polynomial regression with mandatory scaler validation. Ensure robust prediction handling by calculating training predictions (y_train_pred) before denormalization and automatically configuring datetime indices for time-series operations. 2025-12-18 17:05:10 -03:00
Bruno Domingues
6e8f87b2a3 SIENTIAPDE-1430: Implement advanced model training capabilities and enhanced data preprocessing. This includes support for Polynomial Regression with configurable degree and interaction terms, flexible per-variable lag configurations, and new data filtering options by date range and removed intervals. Comprehensive business validations are now enforced for all parameters, and MLflow logging has been extended to capture these detailed configurations. Additionally, Reduced Coulomb Energy (RCE) metrics are added for drift detection, with a new changelog documenting all pipeline parameter updates. 2025-12-17 21:39:43 -03:00
Bruno Domingues
9d3ecc1c2f SIENTIAPDE-1350: Simplify exception handling for file and directory deletion in cleanup activity 2025-11-27 11:00:16 -03:00
Bruno Domingues
5dcb62ef4b SIENTIAPDE-1350: Integrate cleanup workflow and update default task queue names. 2025-11-26 22:11:20 -03:00
Bruno Domingues
b028dc1b7d SIENTIAPDE-1350: Implement scheduled cleanup workflow using Temporal schedules. Adds schedule creation to worker startup and configures environment variables. 2025-11-25 18:12:53 -03:00
Bruno Domingues
463906073e SIENTIAPDE-1350: Refactor: Improve logging, configuration, and resource management. Includes .env updates, client initialization logging, and resource closing. 2025-11-24 23:08:29 -03:00
Bruno Domingues
2ee66552d2 SIENTIAPDE-1350: Configure separate task queues for train and cleanup workers, update sientia-dataops-library to 1.6.1 and refactor prometheus server startup to use logger. 2025-11-24 11:21:43 -03:00
Bruno Domingues
53f49d7a97 SIENTIAPDE-1350: Implement file cleanup workflow and activities, including MinIO and local directory cleanup, configuration, and metrics. 2025-11-19 18:38:00 -03:00
Bruno Domingues
f232406bd3 SIENTIAPDE-1309: Improve .gitignore to preserve .gitkeep in model_manager reports temp directory. 2025-11-07 15:25:10 -03:00
Bruno Domingues
7ff54a1112 SIENTIAPDE-1309: Improve Dockerignore, Gitignore, Dockerfile, README, model repository, tests, todo list and values.yaml files. 2025-11-07 15:08:50 -03:00
Bruno Domingues
c7f44a2423 SIENTIAPDE-1309: Update README with Helm instructions and refactor experiment status messages. Also, update values.yaml with new image and configurations. 2025-11-06 15:34:03 -03:00
Bruno Domingues
9f56a128e6 SIENTIAPDE-1308: Update documentation, remove install_dependencies.sh script from README, correct Training class initialization, and update sientia-dataops-library version in requirements.txt. 2025-11-03 17:35:33 -03:00