Model Registry
Store approved model versions, metadata, and release status.
A team may train hundreds of candidates with different datasets, features, algorithms, parameters, and performance trade-offs. A model registry gives those artifacts controlled identities, metadata, lifecycle states, and relationships to deployments so teams can answer what is approved, what is serving, and why.
What Is a Model Registry?
A model registry is a system for cataloging, versioning, governing, and retrieving model artifacts and their metadata throughout the ML lifecycle. It links a model to training lineage, evaluation evidence, ownership, approvals, deployment history, and operational status.
A registry is more than a folder of model files. It provides structured lifecycle management and an interface that training, CI/CD, deployment, monitoring, governance, and rollback processes can use.
Why a Registry Is Necessary
- Replaces ambiguous files such as model_final_v2_latest.pkl with unique registered versions.
- Shows which candidate passed required evaluation and review.
- Connects production behavior to an exact model artifact and lineage.
- Supports controlled promotion, rollback, archive, and retirement.
- Prevents deployment pipelines from selecting models by filename or an unreviewed metric alone.
- Enables collaboration among data science, engineering, operations, security, and governance teams.
- Creates evidence for incident investigation, audit, reproducibility, and model inventory.
Registry vs Related Systems
| System | Primary Role | Relationship to Registry |
|---|---|---|
| Experiment tracker | Records training runs, parameters, metrics, and artifacts | A selected run produces a registry candidate |
| Artifact store | Stores model files and related binaries | Registry references immutable artifacts and checksums |
| Model registry | Manages model identity, versions, stages, approvals, and lineage | Source of approved deployable model metadata |
| Feature store | Manages reusable feature definitions and values | Registry records feature compatibility and references |
| Source control | Versions code, config, tests, prompts, and deployment files | Registry records the producing commit |
| Deployment platform | Runs model-serving or batch workloads | Reports deployed version and environment back to registry |
| Model catalog or inventory | Provides organization-wide discovery and risk oversight | May aggregate registry and governance records |
The Registry Workflow
Versioned code + data + config
-> Reproducible training run
-> Evaluation and comparison
-> Register immutable candidate
-> Automated quality and security gates
-> Human approval when required
-> Assign deployment alias or approved status
-> Staged production rollout
-> Record deployment and monitoring evidence
-> Promote, roll back, archive, or retireModel Identity
| Identifier | Purpose |
|---|---|
| Registered model name | Groups versions with the same intended contract or capability |
| Version | Uniquely identifies one immutable registered artifact |
| Artifact digest | Verifies exact artifact content |
| Run ID | Links to the training or packaging execution |
| Alias | Points to a role such as champion, candidate, or shadow |
| Stage or status | Represents lifecycle state such as validated or archived |
| Deployment ID | Links the model version to an environment and release |
Version numbers and statuses must not be inferred from accuracy or file timestamps. They should be assigned through a controlled registration and promotion process.
Required Metadata
| Category | Examples |
|---|---|
| Identity | Model name, version, artifact URI, checksum, format |
| Purpose | Use case, owner, users, intended and prohibited use |
| Training lineage | Run ID, source commit, dataset, split, features, parameters, environment |
| Evaluation | Metrics, slices, robustness, safety, fairness, latency, cost, test-set version |
| Compatibility | Input and output schema, preprocessing, runtime, hardware, dependencies |
| Governance | Risk level, documentation, approvals, expiration, restrictions |
| Deployment | Environment, image digest, endpoint, traffic, release and rollback state |
| Operations | Monitoring dashboard, alerts, incidents, drift, feedback, retirement status |
Example Registry Record
{
"model_name": "support-classifier",
"version": "17",
"status": "approved",
"aliases": ["candidate"],
"artifact": {
"uri": "models://support-classifier/17",
"sha256": "<approved-checksum>",
"format": "onnx"
},
"lineage": {
"training_run_id": "run_8f31",
"git_commit": "a1b2c3d",
"dataset_version": "tickets-2026-07",
"feature_schema": "ticket-features-v4"
},
"evaluation": {
"suite": "ticket-eval-v6",
"macro_f1": 0.92,
"high_risk_recall": 0.98,
"latency_p95_ms": 84
},
"owner": "support-ml-team",
"approved_by": "ml-release-review",
"approved_at": "2026-07-20T09:30:00Z"
}Model Artifacts
A model artifact may include weights, a serialized pipeline, tokenizer, vocabulary, label map, preprocessing graph, calibration object, or runtime package. Define which files form one deployable unit and verify them with checksums and compatibility tests.
- Use safe, supported serialization formats and treat imported artifacts as untrusted.
- Avoid formats that can execute arbitrary code unless the source and integrity are trusted and controlled.
- Store large artifacts in an approved artifact backend rather than Git.
- Make registered versions immutable; corrections should create a new version.
- Retain enough metadata to load the artifact without guessing dependencies or preprocessing.
Lifecycle States
| State | Meaning | Allowed Transition Example |
|---|---|---|
| Candidate | Registered artifact awaiting complete checks | Candidate to validated |
| Validated | Passed automated technical and quality gates | Validated to review |
| Approved | Authorized for a defined deployment context | Approved to staging |
| Staging | Under deployment and integration validation | Staging to production candidate |
| Production | Serving an active workload | Production to superseded |
| Superseded | Replaced but retained for rollback and history | Superseded to archived |
| Rejected | Failed required criteria | Retained with reason; not deployable |
| Archived | Not eligible for new release but retained according to policy | Archive to deletion only by retention policy |
| Retired | No longer serving and decommissioned | Final operational state |
Exact names vary by registry. Define transitions, required evidence, permissions, and automatic versus human gates explicitly rather than relying on informal labels.
Aliases vs Stages
An alias such as champion or shadow is a movable pointer to a version. A lifecycle state describes governance status. Keep the distinction clear: moving a champion alias can change deployment selection, while approved may only indicate eligibility.
Promotion Criteria
- Artifact and lineage are complete, immutable, and integrity-verified.
- Required code, data, schema, dependency, and security checks pass.
- Candidate meets predefined overall, slice, robustness, fairness, and safety thresholds.
- Latency, throughput, memory, accelerator, and cost requirements pass.
- Input, output, preprocessing, and deployment compatibility is confirmed.
- Documentation, owner, monitoring, rollback, and expiration are defined.
- Risk-appropriate human reviewers approve the intended environment and use.
Choosing the Best Model
The highest offline score is not automatically the best production model. Selection must consider error costs, important slices, calibration, latency, throughput, memory, hardware, cost, explainability, robustness, safety, and operational complexity.
| Candidate | F1 | P95 Latency | Memory | Decision |
|---|---|---|---|---|
| v15 | 0.90 | 45 ms | 600 MiB | Current champion |
| v16 | 0.93 | 420 ms | 7 GiB | Reject for online latency |
| v17 | 0.92 | 84 ms | 1.2 GiB | Approve for canary |
| v18 | 0.91 | 38 ms | 500 MiB | Consider for edge deployment |
Champion-Challenger Pattern
The champion is the current approved production model; challengers are candidates evaluated against it. Use the same evaluation definitions and production-like constraints, then deploy a challenger through shadow or canary traffic before promotion.
Registering a Model
# Conceptual registry client API
record = registry.register_model(
name="support-classifier",
artifact_uri=artifact.uri,
artifact_sha256=artifact.sha256,
training_run_id=run.id,
source_commit=run.git_commit,
dataset_version=run.dataset_version,
evaluation_report_uri=evaluation.report_uri,
input_schema="ticket-input-v3",
output_schema="ticket-output-v2",
owner="support-ml-team",
)
print(record.version)Registry APIs differ. Registration should fail when required lineage, artifact integrity, schema, or evaluation evidence is missing rather than accepting an undocumented artifact.
CI/CD Integration
Training pipeline creates candidate
-> Upload artifact and integrity metadata
-> Register immutable model version
-> CI validates lineage, schemas, metrics, security, and documentation
-> Approval changes lifecycle state or alias
-> CD reads exact approved version
-> Build or select compatible serving image
-> Deploy to staging and run smoke and load tests
-> Canary production
-> Record deployment and monitoring links in registryDeployment should resolve a specific immutable model version before release. Do not let production fetch a mutable latest reference whose target can change without a deployment record.
Model and Serving-Code Compatibility
- Record supported input and output schemas.
- Version preprocessing, tokenizer, feature definitions, label maps, and calibration.
- Record runtime, library, hardware, and accelerator requirements.
- Run a model-load and sample-inference test with the exact serving image.
- Use compatibility matrices or packaged pipelines when models and code evolve independently.
- Prevent promotion when the serving release cannot safely load or interpret the artifact.
Deployment Tracking
| Field | Example |
|---|---|
| Environment | production-ap-south |
| Model version | support-classifier:17 |
| Serving image | registry.example.com/support-api@sha256:<digest> |
| Configuration | release-config-v24 |
| Traffic | canary 10 percent |
| Started | 2026-07-20T11:00:00Z |
| Release owner | ml-platform-oncall |
| Dashboard | approved monitoring reference |
| Rollback target | support-classifier:15 |
Rollback
A registry makes the previous approved artifact discoverable, but rollback also requires compatible serving code, features, schemas, infrastructure, and data state. Test the complete rollback path and retain the last known-good artifacts for the required period.
Canary guardrail fails
-> Stop traffic increase
-> Move deployment to immutable previous model and serving versions
-> Verify readiness and synthetic predictions
-> Restore traffic gradually
-> Reconcile outputs or decisions produced by failed candidate
-> Record incident and deployment outcome in registryMonitoring Integration
- Attach model, image, feature, prompt, and configuration versions to logs, metrics, and traces.
- Link registry versions to service, quality, drift, fairness, safety, cost, and outcome dashboards.
- Record production evaluation windows and feedback-label coverage.
- Associate alerts, incidents, rollbacks, and corrective actions with the affected version.
- Use production evidence to create a new candidate rather than mutating the registered artifact.
- Block or retire versions with unresolved critical vulnerabilities or policy issues.
Access Control
| Capability | Example Restriction |
|---|---|
| Read metadata | Broad internal discovery where appropriate |
| Download artifact | Only authorized training, evaluation, and serving identities |
| Register candidate | Approved training pipelines and engineers |
| Change status or alias | Release automation or authorized reviewers |
| Deploy production | Protected deployment identity and environment approval |
| Archive or delete | Governance owner under retention policy |
| Edit documentation | Model owner with review and audit |
Use least privilege and separate artifact upload, approval, and production deployment where required. Audit who performed each lifecycle action and prevent silent metadata rewriting.
Security
- Authenticate clients and encrypt registry traffic and storage.
- Verify artifact hashes and provenance before registration and deployment.
- Scan artifacts, packages, and serving images for known risks.
- Treat model formats capable of code execution as high-risk inputs.
- Protect registry credentials and use short-lived workload identity where possible.
- Restrict network access and prevent serving workloads from writing registry state.
- Back up registry metadata and artifact stores and test restoration.
- Monitor unusual downloads, promotions, deletions, and permission changes.
Governance Documentation
- Intended users, use cases, and prohibited uses
- Training data sources, time period, rights, limitations, and representativeness
- Evaluation metrics, slices, thresholds, uncertainty, and known failure modes
- Fairness, privacy, security, robustness, and safety assessments
- Human oversight and appeal or escalation process
- Operational requirements, monitoring, expiration, review, and retirement
- Business and technical owners plus approval history
Retention, Archive, and Retirement
Do not keep every artifact forever or delete history casually. Define retention by rollback needs, legal or audit requirements, storage cost, security exposure, and reproducibility. Archiving removes deployment eligibility while preserving required evidence; retirement also removes traffic, integrations, monitoring, credentials, and unsupported dependencies.
Registry Reliability
- Design metadata and artifact storage for required availability and durability.
- Back up both the registry database and artifact backend consistently.
- Use immutable artifacts and transactional or idempotent lifecycle updates.
- Cache production artifacts locally or in the serving platform when registry outages must not stop existing service.
- Avoid making every prediction depend on a live registry call.
- Test restore, corruption detection, and disaster-recovery procedures.
Registry Metrics
| Area | Examples |
|---|---|
| Inventory | Models, versions, owners, risk classes, and active deployments |
| Quality | Candidates passing and failing each evaluation gate |
| Flow | Time from registration to approval and deployment |
| Operations | Downloads, errors, latency, integrity failures, and storage |
| Governance | Missing documentation, expired approvals, overdue reviews |
| Lifecycle | Stale candidates, unsupported production versions, archived artifacts |
| Security | Unauthorized attempts, abnormal downloads, and vulnerable artifacts |
Multi-Model and Variant Management
A single capability may have global, regional, language, tenant, edge, or hardware-specific variants. Name and group them according to compatible contracts and intended deployment. Avoid one broad model name that hides incompatible inputs, policies, or serving requirements.
Traditional ML and Generative AI
For externally hosted foundation models, the registry may not store weights. It can register a logical AI release containing provider and model identifier, prompt bundle, tool definitions, output schema, retrieval corpus version, safety configuration, evaluations, and deployment metadata.
{
"release_name": "support-assistant",
"version": "12",
"provider_model": "approved-provider-model-id",
"prompt_bundle": "support-prompts-v8",
"retrieval_index": "support-kb-2026-07-20",
"tool_schema": "support-tools-v3",
"evaluation_suite": "support-assistant-eval-v10",
"status": "approved-for-canary"
}Common Mistakes
| Mistake | Better Practice |
|---|---|
| Store only a file and accuracy | Record full lineage, compatibility, evaluation, owner, and governance |
| Mutate registered artifacts | Create immutable versions and verify checksums |
| Deploy latest | Resolve and deploy an approved immutable version |
| Promote by one metric | Use multidimensional predefined gates and review |
| Confuse registry stage with deployment | Track lifecycle and actual environment releases separately |
| No link to serving image | Test and record model-code compatibility |
| Delete old production model | Retain rollback targets according to policy |
| Registry is the prediction dependency | Resolve artifacts at deploy or startup, not every request |
Practical Exercise
- Train two classifier candidates from a versioned dataset and tracked source commit.
- Store immutable artifacts with checksums and complete lineage.
- Create an evaluation report covering quality, slices, latency, memory, and safety.
- Register both candidates and reject one with a documented reason.
- Approve the stronger eligible model for staging and test it with the serving image.
- Assign a candidate alias, deploy a canary, and record its environment and traffic.
- Simulate a guardrail failure and roll back to the champion.
- Archive the rejected artifact and document retention and access controls.
Registry Checklist
[ ] Unique immutable model identity and artifact digest
[ ] Source commit, training run, dataset, features, and environment
[ ] Input, output, preprocessing, runtime, and hardware compatibility
[ ] Versioned evaluation report and acceptance gates
[ ] Owner, purpose, limits, risk, and governance documents
[ ] Protected lifecycle transitions and approvals
[ ] Serving image, environment, traffic, monitoring, and rollback target
[ ] Least privilege, audit, scanning, backup, and restore
[ ] Retention, archive, expiration, and retirement policyBest Practices
- Register immutable artifacts with complete training and evaluation lineage.
- Define model names, versions, statuses, aliases, and lifecycle transitions clearly.
- Promote using predefined multidimensional gates and risk-appropriate approval.
- Test and record compatibility between model, features, schemas, runtime, hardware, and serving code.
- Deploy exact approved versions and link every environment to its model and image digests.
- Connect production monitoring, incidents, rollback, and feedback to registry versions.
- Protect artifacts and lifecycle changes through integrity verification, least privilege, audit, backup, and restoration.
- Manage retention, archive, review, expiration, and retirement as part of the lifecycle.