model registry
**A Model Registry** is a **centralized repository for storing, versioning, staging, and managing machine learning models throughout their lifecycle** — serving as the critical bridge between experimentation and production by tracking every model version with its metadata (accuracy, training dataset, hyperparameters), managing promotion stages (Staging → Production → Archived), storing model artifacts (model.pkl, saved_model.pb), and enabling reproducibility by linking each deployed model back to the exact code, data, and configuration that produced it.
**What Is a Model Registry?**
- **Definition**: A versioned catalog of trained ML models that stores model artifacts alongside metadata (metrics, parameters, lineage) and manages the lifecycle stages that control which model version serves production traffic.
- **The Problem**: Without a registry, teams lose track of which model is in production, which version produced those great results last month, what training data was used, and whether the model can be reproduced. Models live on individual laptops, shared drives, or unnamed S3 buckets.
- **The Solution**: A single source of truth where every model is registered with a version number, linked to its training run, and assigned a lifecycle stage — eliminating "which model.pkl is the right one?" confusion.
**Core Functions**
| Function | Description | Example |
|----------|------------|---------|
| **Versioning** | Track every model iteration with a unique version | v1.0, v1.1, v2.0-beta |
| **Staging** | Assign lifecycle tags to control deployment | None → Staging → Production → Archived |
| **Metadata** | Store metrics, parameters, and training details | accuracy=0.94, lr=0.001, dataset=customers_v3 |
| **Artifacts** | Store the actual model binary | model.pkl, saved_model.pb, model.onnx |
| **Lineage** | Link model to the exact code commit, data version, and experiment run | git_sha=a3f2b1, dataset=s3://data/v3, run_id=42 |
| **Access Control** | Manage who can promote models to production | Only ML Eng lead can promote to Production |
**Typical Workflow**
| Step | Action | Registry State |
|------|--------|---------------|
| 1. Train model | Data scientist trains v3 of fraud detector | Registered as version 3 |
| 2. Evaluate | Compare v3 metrics against v2 in registry | Metadata: accuracy=0.96 vs v2=0.93 |
| 3. Stage | Promote v3 to Staging | Stage: Staging |
| 4. CI/CD tests | Automated smoke tests, latency checks | Pass/Fail recorded |
| 5. Promote | Move v3 to Production | Stage: Production |
| 6. Archive v2 | Previous production model archived | v2 Stage: Archived |
| 7. Rollback (if needed) | v3 has issues, revert to v2 | v2: Production, v3: Archived |
**Model Registry Tools**
| Tool | Hosting | Strengths | Integration |
|------|---------|-----------|------------|
| **MLflow Model Registry** | Self-hosted or Databricks | Most popular open-source, full lifecycle | Any ML framework |
| **AWS SageMaker Registry** | AWS | Native AWS integration, IAM permissions | SageMaker ecosystem |
| **WandB Model Registry** | Cloud (wandb.ai) | Beautiful UI, linked to experiment tracking | Any framework |
| **Hugging Face Hub** | Cloud | Best for NLP/LLM models, community sharing | Transformers library |
| **Vertex AI Model Registry** | GCP | Native GCP integration | TensorFlow, PyTorch, XGBoost |
| **Neptune** | Cloud | Strong experiment + model tracking | Any framework |
**Model Registry vs Experiment Tracking**
| Aspect | Experiment Tracking (WandB, MLflow Tracking) | Model Registry |
|--------|----------------------------------------------|---------------|
| **Purpose** | Log every training run (including failures) | Manage production-worthy models only |
| **Scope** | Hundreds of experimental runs | Curated set of promoted models |
| **Users** | Data scientists during development | ML engineers during deployment |
| **Lifecycle** | Run → logged → compared | Registered → Staged → Production → Archived |
**A Model Registry is the essential MLOps component for production ML** — providing versioned, staged, metadata-rich model management that enables reproducible deployments, instant rollbacks, and clear governance over which model serves production traffic, eliminating the chaos of untracked model files scattered across notebooks and storage buckets.