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.
This commit is contained in:
vitor-aignosi
2026-04-06 11:40:08 -03:00
parent a8b926649a
commit 1352d1ac8f
5 changed files with 62 additions and 22 deletions

View File

@@ -1,4 +1,5 @@
from dataclasses import dataclass
from typing import Any
import pandas as pd
@@ -50,3 +51,9 @@ class TrainModelResult:
test_data_path: str | None = None
run_dir: str | None = None
def to_dict(self) -> dict[str, Any]:
"""
Convert TrainModelResult to a dictionary.
"""
return self.__dict__