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

SystemPrimary RoleRelationship to Registry
Experiment trackerRecords training runs, parameters, metrics, and artifactsA selected run produces a registry candidate
Artifact storeStores model files and related binariesRegistry references immutable artifacts and checksums
Model registryManages model identity, versions, stages, approvals, and lineageSource of approved deployable model metadata
Feature storeManages reusable feature definitions and valuesRegistry records feature compatibility and references
Source controlVersions code, config, tests, prompts, and deployment filesRegistry records the producing commit
Deployment platformRuns model-serving or batch workloadsReports deployed version and environment back to registry
Model catalog or inventoryProvides organization-wide discovery and risk oversightMay aggregate registry and governance records

The Registry Workflow

Output
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 retire

Model Identity

IdentifierPurpose
Registered model nameGroups versions with the same intended contract or capability
VersionUniquely identifies one immutable registered artifact
Artifact digestVerifies exact artifact content
Run IDLinks to the training or packaging execution
AliasPoints to a role such as champion, candidate, or shadow
Stage or statusRepresents lifecycle state such as validated or archived
Deployment IDLinks 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

CategoryExamples
IdentityModel name, version, artifact URI, checksum, format
PurposeUse case, owner, users, intended and prohibited use
Training lineageRun ID, source commit, dataset, split, features, parameters, environment
EvaluationMetrics, slices, robustness, safety, fairness, latency, cost, test-set version
CompatibilityInput and output schema, preprocessing, runtime, hardware, dependencies
GovernanceRisk level, documentation, approvals, expiration, restrictions
DeploymentEnvironment, image digest, endpoint, traffic, release and rollback state
OperationsMonitoring dashboard, alerts, incidents, drift, feedback, retirement status

Example Registry Record

JSON
{
  "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

StateMeaningAllowed Transition Example
CandidateRegistered artifact awaiting complete checksCandidate to validated
ValidatedPassed automated technical and quality gatesValidated to review
ApprovedAuthorized for a defined deployment contextApproved to staging
StagingUnder deployment and integration validationStaging to production candidate
ProductionServing an active workloadProduction to superseded
SupersededReplaced but retained for rollback and historySuperseded to archived
RejectedFailed required criteriaRetained with reason; not deployable
ArchivedNot eligible for new release but retained according to policyArchive to deletion only by retention policy
RetiredNo longer serving and decommissionedFinal 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.

CandidateF1P95 LatencyMemoryDecision
v150.9045 ms600 MiBCurrent champion
v160.93420 ms7 GiBReject for online latency
v170.9284 ms1.2 GiBApprove for canary
v180.9138 ms500 MiBConsider 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

Python
# 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

Output
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 registry

Deployment 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

FieldExample
Environmentproduction-ap-south
Model versionsupport-classifier:17
Serving imageregistry.example.com/support-api@sha256:<digest>
Configurationrelease-config-v24
Trafficcanary 10 percent
Started2026-07-20T11:00:00Z
Release ownerml-platform-oncall
Dashboardapproved monitoring reference
Rollback targetsupport-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.

Output
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 registry

Monitoring 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

CapabilityExample Restriction
Read metadataBroad internal discovery where appropriate
Download artifactOnly authorized training, evaluation, and serving identities
Register candidateApproved training pipelines and engineers
Change status or aliasRelease automation or authorized reviewers
Deploy productionProtected deployment identity and environment approval
Archive or deleteGovernance owner under retention policy
Edit documentationModel 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

AreaExamples
InventoryModels, versions, owners, risk classes, and active deployments
QualityCandidates passing and failing each evaluation gate
FlowTime from registration to approval and deployment
OperationsDownloads, errors, latency, integrity failures, and storage
GovernanceMissing documentation, expired approvals, overdue reviews
LifecycleStale candidates, unsupported production versions, archived artifacts
SecurityUnauthorized 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.

JSON
{
  "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

MistakeBetter Practice
Store only a file and accuracyRecord full lineage, compatibility, evaluation, owner, and governance
Mutate registered artifactsCreate immutable versions and verify checksums
Deploy latestResolve and deploy an approved immutable version
Promote by one metricUse multidimensional predefined gates and review
Confuse registry stage with deploymentTrack lifecycle and actual environment releases separately
No link to serving imageTest and record model-code compatibility
Delete old production modelRetain rollback targets according to policy
Registry is the prediction dependencyResolve 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

Output
[ ] 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 policy

Best 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.