Model registry: versions, aliases and promotion

ExplainedMLOpsDevOps, Hands OnBy Cloud Hands On

How a registry lets apps ask for 'the current model' while you decide, with evidence, which version that is.

A model registry stores models under a name, each with a version number and a link to the run that made it. Instead of copying model files to servers, apps load a model by name and alias, for example models:/delivery-late@champion.

Promotion is moving the alias to a new version, ideally done by a pipeline after a fair comparison: the challenger must beat the champion on the same holdout data by a margin. Rollback is moving the alias back. Nothing is rebuilt or copied either way.

Treat the registry as part of your security: only the pipeline (or a few people) should register models or move aliases, and model files from elsewhere shouldn't be loaded without checks, because model files can contain code.

Cost. Free with MLflow locally; included in Azure Machine Learning workspaces.

Use it when

How it works

Register
Save a model version from a run.
Label
Point @challenger at the newest candidate.
Compare
Score champion and challenger on the same holdout.
Promote
Move @champion if the challenger wins by a margin.
Roll back
Move @champion back to the previous version.

Options

Aliases
Movable names such as @champion; the modern MLflow way.
Stages
Older MLflow labels (Staging, Production), now replaced by aliases.
Tags
Notes on versions, such as who approved them.

Example. Harbourline Design's lead-scoring service loads @champion on start-up. When a promoted model gave odd scores one Monday, the on-call engineer moved the alias back and restarted the service; the old model was serving again within two minutes.

Don't confuse it with

Version
A fixed number for one model; never changes.
Alias
A name you move between versions.

Words to know

Registry
A store of named, versioned models.
Alias
A movable name that points at one version.
Promotion
Moving the in-use alias to a better version.

Where to look

  1. MLflow UI
  2. Models
  3. delivery-late

Practise it

Read it in the guide, next to the tasks and labs.

Open in DevOps, Hands On

Keep going