Sub topic 1
What the Model Registry is for
Prerequisites
This chapter assumes that you know basic Python, virtual environments, and command-line use. You should also understand MLflow Tracking concepts such as experiments, runs, parameters, metrics, and artifacts. Finally, you should have trained and saved a simple scikit-learn model.
From an experiment to a managed model
MLflow Tracking records the work performed during a machine learning experiment. A run is one execution of training or evaluation. A run can contain parameters, metrics, source information, and files called artifacts. A saved model is one type of artifact.
The Model Registry adds a management layer to those artifacts. It gives a model a stable name, records each registered copy as a version, and stores information needed to decide whether that version can be used.
For example, a training run might produce a model artifact at:
runs:/abc123/model
That URI identifies the artifact inside one run. After registration, the same model can be addressed through a stable registered-model name:
models:/iris-classifier/1
The run records how the model was produced. The registry records which model versions are available and which version an application should use.
The registry's main objects
A registered model is a named collection of model versions. In this example, iris-classifier is the registered model.
A model version is one registered model artifact. Version 1 might come from an early experiment, while version 2 comes from a later training run. Each version keeps a link to its source run and artifact location.
The registry can also store descriptions and tags. A description can explain the model's intended use. Tags can record structured facts such as validation status, dataset name, or approval owner.
| Object | Meaning | Example |
|---|---|---|
| Run | One tracked training or evaluation execution | Run `abc123` |
| Logged model | Model artifact produced by a run | `runs:/abc123/model` |
| Registered model | Stable name grouping versions | `iris-classifier` |
| Model version | One registered copy in that group | Version `2` |
| Alias | Mutable name pointing to one version | `champion` |
The registry does not replace experiment tracking. It connects tracked evidence to a model that other people and systems can find, review, and load.
Why stable names matter
Application code should not need to know which training run produced the current production model. A run ID changes every time training runs. A version number is stable, but changing the number requires changing configuration or code.
An alias provides an additional level of indirection. The alias champion can point to version 2 today and version 3 after a successful promotion. Serving code can keep loading models:/iris-classifier@champion while an authorized workflow changes the pointer.
This separation supports review and rollback. A promotion changes which version an alias identifies. It does not rewrite the model artifact or erase the run that produced it.
A small mental model
When investigating a deployed model, ask these questions:
- Which registered model name does the application load?
- Does it load an alias or a fixed version?
- Which version does that name currently resolve to?
- Which run and artifact produced that version?
- What tags or descriptions explain its validation and intended use?
These questions follow the chain from a serving decision back to reproducible training evidence. Later chapters use this chain to register, promote, inspect, and roll back models.
Exercise
Why is models:/iris-classifier@champion usually more suitable for serving code than runs:/abc123/model?
Show answer
The alias gives serving code a stable name while authorized promotion workflows can move it to a different validated version. A run URI points directly to one training run and must be changed manually when a new model is selected.