Version Management
Every model in MATIH is versioned with complete lineage tracking, including the training data, hyperparameters, metrics, and artifact locations used to produce each version.
Model Version Registration
from src.lifecycle.lifecycle_manager import ModelLifecycleManager
manager = ModelLifecycleManager(policy=policy)
version = manager.register_version(
model_id="fraud-detector",
version="3.2.1",
artifact_path="s3://models/fraud-detector/v3.2.1/model.onnx",
description="XGBoost with updated transaction features",
tags={"framework": "xgboost", "dataset": "txn-v5"},
metrics={"accuracy": 0.934, "f1": 0.912, "auc": 0.967},
)Promotion Flow
# Promote to next stage
request = manager.promote(
model_id="fraud-detector",
version="3.2.1",
user_id="alice@acme.com",
reason="Outperforms current production model by 3% accuracy",
)
# If approval required, approve the transition
manager.approve_transition(
request_id=str(request.id),
approved_by="bob@acme.com",
notes="Reviewed benchmark results, approved for production",
)Source Files
| File | Path |
|---|---|
| Version Manager | data-plane/ml-service/src/lifecycle/version_manager.py |
| Lifecycle Manager | data-plane/ml-service/src/lifecycle/lifecycle_manager.py |