Model registry

Model registry to manage the model lifecycle from training to production

The W&B Model Registry houses a team’s trained models where ML Practitioners can publish candidates for production to be consumed by downstream teams and stakeholders. It is used to house staged/candidate models and manage workflows associated with staging.

With W&B Model Registry, you can:

How it works

Track and manage your staged models with a few simple steps.

  1. Log a model version: In your training script, add a few lines of code to save the model files as an artifact to W&B.
  2. Compare performance: Check live charts to compare the metrics and sample predictions from model training and validation. Identify which model version performed the best.
  3. Link to registry: Bookmark the best model version by linking it to a registered model, either programmatically in Python or interactively in the W&B UI.

The following code snippet demonstrates how to log and link a model to the Model Registry:

import wandb
import random

# Start a new W&B run
run = wandb.init(project="models_quickstart")

# Simulate logging model metrics
run.log({"acc": random.random()})

# Create a simulated model file
with open("my_model.h5", "w") as f:
    f.write("Model: " + str(random.random()))

# Log and link the model to the Model Registry
run.link_model(path="./my_model.h5", registered_model_name="MNIST")

run.finish()
  1. Connect model transitions to CI/DC workflows: transition candidate models through workflow stages and automate downstream actions with webhooks or jobs.

How to get started

Depending on your use case, explore the following resources to get started with W&B Models:


Tutorial: Use W&B for model management

Learn how to use W&B for Model Management

Model Registry Terms and Concepts

Model Registry terms and concepts

Track a model

Track a model, the model’s dependencies, and other information relevant to that model with the W&B Python SDK.

Create a registered model

Create a registered model to hold all the candidate models for your modeling tasks.

Link a model version

Link a model version to a registered model with the W&B App or programmatically with the Python SDK.

Organize models

Create model lineage map

Document machine learning model

Add descriptions to model card to document your model

Download a model version

How to download a model with W&B Python SDK

Create alerts and notifications

Get Slack notifications when a new model version is linked to the model registry.

Manage data governance and access control

Use model registry role based access controls (RBAC) to control who can update protected aliases.