Commit Graph

138 Commits

Author SHA1 Message Date
Kou-Kinoshita
61364671db SIENTIAPDE-1241: Added remaining trainig_repository tests and some model_repository tests 2025-10-29 11:41:36 -03:00
Kou-Kinoshita
4fdefd8263 SIENTIAPDE-1241: Added training repository tests 2025-10-29 11:32:24 -03:00
Lucas Kou Kinoshita
8103f530e2 Merge pull request #9 from Aignosi/feature/SIENTIAPDE-1321
Feature/SIENTIAPDE-1321: A equação do modelo deve ficar disponível como artefato logo após o treinamento.
2025-10-29 11:21:25 -03:00
Kou-Kinoshita
63a5de5938 SIENTIAPDE-1321: Fixed tests 2025-10-29 10:29:43 -03:00
Kou-Kinoshita
25ad4729f7 SIENTIAPDE-1321: Formatted files 2025-10-29 10:24:25 -03:00
Kou-Kinoshita
734221e32d SIENTIAPDE-1321: Updated tests 2025-10-27 19:45:47 -03:00
Kou-Kinoshita
a80d65d7ba SIENTIAPDE-1321: Added equation related methods 2025-10-24 08:03:27 -03:00
Bruno Domingues
7826e68954 SIENTIAPDE-1241: Add unit tests for ModelRepository with 100% coverage. 2025-10-23 15:09:40 -03:00
Bruno Domingues
0a33bb86ed SIENTIAPDE-1241: Add unit tests for TrainModelParams model with 100% coverage. 2025-10-23 11:18:19 -03:00
Bruno Domingues
2262dcf4a0 SIENTIAPDE-1241: Add unit tests for logger_helper module. 2025-10-23 09:15:09 -03:00
Bruno Domingues
a66c5abdfd SIENTIAPDE-1241: Add unit tests for custom exceptions in tests/utils/test_exceptions.py 2025-10-23 00:30:48 -03:00
Bruno Domingues
3fe139763a SIENTIAPDE-1241: Add unit tests for the Training activity with 100% coverage. 2025-10-23 00:25:25 -03:00
Bruno Domingues
a6f1563036 SIENTIAPDE-1241: Add unit tests for ExperimentTracking class with 100% coverage.
This commit introduces a new test file tests/activities/test_experiment_tracking.py containing comprehensive unit tests for the ExperimentTracking class, achieving 100% test coverage. The tests cover initialization, deletion, execution of updates, and various scenarios for updating experiment run status, including error handling and edge cases.
2025-10-23 00:18:14 -03:00
Bruno Domingues
fc2fe33b59 SIENTIAPDE-1241: Add unit tests for Activities class and enhance validation script with fix and test options
This commit introduces a new test suite for the Activities class, achieving 100% coverage. Additionally, the validation script (validate.sh) is enhanced with new options:

- --fix: Automatically fixes code formatting and linting issues using Ruff.
- --only-tests: Runs only the unit tests, skipping other validation steps.

The validation script now also supports skipping tests and provides more informative output.
2025-10-22 23:38:01 -03:00
Bruno Domingues
f07bc8ff30 SIENTIAPDE-1241: Refactor: Remove redundant logging and fix duplicate logs
This commit removes redundant logging statements from training and experiment tracking activities, preventing duplicate log entries. It also introduces a logger helper to disable log propagation, further addressing the duplicate logs issue. Additionally, the Makefile, run_coverage.sh, setup_port_forwards.sh, and simulator/Dockerfile files were removed as they are no longer needed.
2025-10-22 22:39:26 -03:00
Bruno Domingues
ac97092ebf SIENTIAPDE-1241: Remove unused metadata fields and update todo list. 2025-10-22 21:51:29 -03:00
Bruno Domingues
94697215aa SIENTIAPDE-1241: Refactor: Improve documentation, exception handling, and configuration in model manager. This commit enhances clarity and robustness by adding detailed docstrings to methods, standardizing exception handling with custom types, and simplifying MLflow configuration. 2025-10-22 21:48:12 -03:00
Bruno Domingues
758ffb10b6 SIENTIAPDE-1241: Fix: Correctly handle feature normalization and denormalization, and add scaler parameters to metadata 2025-10-22 21:26:11 -03:00
Bruno Domingues
42a7e82c82 SIENTIAPDE-1241: Suppress sklearn FutureWarning regarding 'squared' deprecation. 2025-10-22 18:28:13 -03:00
Bruno Domingues
5789a13023 SIENTIAPDE-1241: refactor train_model workflow due to I/O errors. 2025-10-22 15:37:56 -03:00
Bruno Domingues
f2a1c88ff3 Merge pull request #8 from Aignosi/feature/SIENTIAPDE-1255
SIENTIAPDE-1255: Refactor Model Manager for Training Pipeline, Integrate Sientia MLOps Library, and Add Unit Tests
2025-10-21 09:42:17 -03:00
Bruno Domingues
ab7c93480b SIENTIAPDE-1255: Refactor: Move extra pip requirements to environment variable and use constants for preprocessor steps. 2025-10-21 09:20:23 -03:00
Bruno Domingues
4686b438db SIENTIAPDE-1255: Update quality gate workflow: Remove redundant repository and disk space cleanup, update cache key. 2025-10-20 22:35:20 -03:00
Bruno Domingues
3e52253a98 SIENTIAPDE-1255: Add tests to ensure get_required_columns removes columns from self_operations and cross_operations. 2025-10-20 22:27:58 -03:00
Bruno Domingues
614eb0cb7f SIENTIAPDE-1255: Add unit tests for utils.split_train_test function 2025-10-20 22:22:38 -03:00
Bruno Domingues
089f312575 SIENTIAPDE-1255: Add unit tests for the reports module 2025-10-20 22:20:26 -03:00
Bruno Domingues
0de2ece063 SIENTIAPDE-1255: Add unit tests for sientia models (DataPreprocessor and LinearRegressionModel) 2025-10-20 20:59:55 -03:00
Bruno Domingues
3c09e59f6a SIENTIAPDE-1255: Add unit tests for the ModelServing class. 2025-10-20 20:24:50 -03:00
Bruno Domingues
b1fe62f68b SIENTIAPDE-1255: Add unit tests for sientia metrics module (MAE, MSE, R2) 2025-10-20 20:13:08 -03:00
Bruno Domingues
b3e4bb8660 SIENTIAPDE-1255: Add comprehensive tests for __del__ methods in Activities and ExperimentTracking to ensure proper resource cleanup and exception handling. 2025-10-20 20:09:49 -03:00
Bruno Domingues
4a32d712ba SIENTIAPDE-1255: Implement object destructors for Activities and ExperimentTracking to prevent AttributeError during garbage collection, and mock workflow logger in tests to avoid RuntimeWarning. 2025-10-20 17:53:49 -03:00
Bruno Domingues
52be5c4e8e SIENTIAPDE-1255: Improve documentation for split_train_test function in utils.py 2025-10-20 17:41:05 -03:00
Bruno Domingues
0dbe179367 SIENTIAPDE-1255: Add thread-safety documentation and I/O notes to Reports class, improve save_all_sections documentation and error handling. 2025-10-20 17:38:44 -03:00
Bruno Domingues
2292ae57cc SIENTIAPDE-1255: Add thread-safety documentation and in-place modification warnings to LinearRegressionModel and DataPreprocessor classes. 2025-10-20 17:27:58 -03:00
Bruno Domingues
56f3db350c SIENTIAPDE-1255: Refactor ModelServing class to improve thread safety, resource management, and documentation. Adds context manager for experiment saving and clarifies thread-safety concerns. 2025-10-20 17:16:45 -03:00
Bruno Domingues
56a21a16da SIENTIAPDE-1255: Integrate sientia-mlops-library into model-manager, adding model serving, reporting, and updated model definitions. 2025-10-20 16:55:52 -03:00
Bruno Domingues
9e31ab679b SIENTIAPDE-1255: Implement MLFlow artifact management and model persistence
This commit introduces a new model_repository.py to handle MLFlow artifact generation and model persistence. It also updates the README to reflect this change and modifies training_repository.py to separate training and MLFlow operations.
2025-10-17 09:11:54 -03:00
Bruno Domingues
a66b996cc1 SIENTIAPDE-1255: Refactor MLFlow activities for training operations and update metrics
This commit refactors the MLFlow activities to focus on model training rather than prediction operations. It removes prediction-related activities and metrics, and updates the MLFlow activity descriptions to reflect the change in focus. The README is also updated to reflect these changes.
2025-10-17 00:51:29 -03:00
Bruno Domingues
85a8ba1e68 SIENTIAPDE-1255: Refactor data quality gates to training focused metrics and repositories. This commit removes the data quality gates and filters, focusing on training-specific metrics and data repositories. It also updates the README to reflect these changes, including new training metrics and a streamlined data services section. 2025-10-17 00:39:06 -03:00
Bruno Domingues
e191e7849f SIENTIAPDE-1255: Refactor Model Manager to focus on ML model training pipeline and simplify architecture. This includes removing prediction workflows, updating core functionality, and improving parameter validation and resource management.
README.md | 411 deletions(-) 117 insertions(+)
1 file changed, 117 insertions(+), 411 deletions(-)
2025-10-16 18:26:56 -03:00
Bruno Domingues
7abd951806 SIENTIAPDE-1255: Refactor worker to support only the train_model-queue and remove prediction workflows. 2025-10-16 18:15:52 -03:00
Bruno Domingues
8f1cc21bb1 SIENTIAPDE-1255: Add port forwarding setup script and documentation to README.md 2025-10-16 18:00:28 -03:00
Bruno Domingues
9ee12373b4 Merge pull request #7 from Aignosi/feature/SIENTIAPDE-1253
SIENTIAPDE-1253: Improve Train Model Workflow with Enhanced Error Handling, Validation, and Cleanup
2025-10-15 17:04:49 -03:00
Bruno Domingues
4ff796a56f SIENTIAPDE-1253: Update README.md to include documentation for the Train Model workflow and renumber the Minimal Retrain workflow. (+101, -1) 2025-10-15 16:35:13 -03:00
Bruno Domingues
98c216733b SIENTIAPDE-1253: Enhance error logging in train_model workflow with rich context for debugging. 2025-10-15 16:19:15 -03:00
Bruno Domingues
305a39b44c SIENTIAPDE-1253: Implement business rule validation for training parameters. Adds a validate_business_rules method to the TrainModelParams class to enforce constraints on training parameters, improving data integrity and preventing errors. Also updates tests to include target variable in variable columns and adds tests for business rule validations. 2025-10-15 16:16:09 -03:00
Bruno Domingues
4b28d5f1c8 SIENTIAPDE-1253: Implement granular retry policies for activities in train_model workflow. 2025-10-15 16:06:13 -03:00
Bruno Domingues
780184769d SIENTIAPDE-1253: Expose workflow activity timeouts as environment variables and document them. 2025-10-15 16:03:01 -03:00
Bruno Domingues
1ec40bfb2a SIENTIAPDE-1253: Implement activity for cleaning up temporary run directory and integrate into train model workflow. This change introduces a new activity for idempotent cleanup of the run directory after model training, replacing the direct directory removal in the workflow. This improves determinism and error handling. Also includes unit tests for the new activity. 2025-10-15 15:49:05 -03:00
Bruno Domingues
8ea98360c3 SIENTIAPDE-1253: Refactor training workflow and activities to raise exceptions on failure
This commit refactors the training workflow and associated activities to raise exceptions on failure instead of returning success/failure dictionaries. This allows the Temporal workflow to handle errors more effectively and ensures that the workflow stops when a critical error occurs.

Key changes:

- The train_model workflow is introduced to orchestrate the entire training process, including parameter validation, data download, model training, and model saving.
- The validate_train_params activity is added to validate and convert training parameters.
- The train_model and save_model activities are updated to raise exceptions on failure.
- The ExperimentStatus enum is updated to include a new status for orchestrator validation errors.
- The tests are updated to reflect the new exception-based error handling.
- The activities now return the TrainModelResult directly instead of a dictionary.
2025-10-15 15:19:29 -03:00