SIENTIAPDE-1250: Implement experiment tracking activity with status updates, error handling, and model registration. This includes a unified update method, error message truncation, and integration into the main activities orchestrator. (236+, 2-)

This commit is contained in:
Bruno Domingues
2025-10-07 11:27:23 -03:00
parent 2628dc92d2
commit 7e1eace77f
5 changed files with 628 additions and 14 deletions

View File

@@ -5,14 +5,14 @@ with workflow.unsafe.imports_passed_through():
from sientia_do.notifications.handlers import CoreNotificationHandler as NotificationHandler
from sientia_do.observability.logger import Logger
from sientia_do.temporal.activities.postgres import Postgres
from model_manager.activities.experiment_tracking import ExperimentTracking
from model_manager.activities.gates import Gates
from model_manager.activities.minio import MinIO
from model_manager.activities.mlflow import MLFlow
class Activities(Postgres, MLFlow, MinIO, Gates):
class Activities(ExperimentTracking, MLFlow, MinIO, Gates):
"""
Main activities orchestrator for the Model Manager system.
@@ -21,7 +21,7 @@ class Activities(Postgres, MLFlow, MinIO, Gates):
MLFlow model interactions, MinIO storage operations, and data quality validation.
The class implements multiple inheritance to combine specialized functionality:
- Postgres: Database operations and data persistence
- ExperimentTracking: ML experiment lifecycle tracking and database operations (extends Postgres)
- MLFlow: Model inference and transformation operations
- MinIO: Object storage operations (file upload/download/delete)
- Gates: Data quality validation and filtering mechanisms
@@ -62,7 +62,7 @@ class Activities(Postgres, MLFlow, MinIO, Gates):
Exception: If any parent class initialization fails
"""
# Initialize parent classes
Postgres.__init__(
ExperimentTracking.__init__(
self,
host=postgres_config['host'],
port=postgres_config['port'],
@@ -107,10 +107,10 @@ class Activities(Postgres, MLFlow, MinIO, Gates):
Gracefully shutdown all activities and clean up resources.
This method ensures proper cleanup of all resources including:
- PostgreSQL connection pools
- PostgreSQL connection pools (via ExperimentTracking)
- Any other resources that need explicit cleanup
The method should be called before the application terminates to ensure
proper resource cleanup and prevent resource leaks.
"""
Postgres.close(self)
ExperimentTracking.close(self)