Registry and aliases
Quick answer
A model registry organizes model versions and their lineage. An alias is a mutable name that points to a registered version; a version identifier is better for recording the exact candidate evaluated. Examples use standard-library Python unless marked native MLflow, which is syntax-checked only. ByteMind execution is unverified.
Isolated empty registry query (native, pending)
import mlflowfrom mlflow import MlflowClientfrom tempfile import TemporaryDirectoryfrom pathlib import Pathwith TemporaryDirectory() as tmp: uri="sqlite:///"+str(Path(tmp).resolve()/"registry.db") client=MlflowClient(tracking_uri=uri,registry_uri=uri) print(len(client.search_registered_models()))Expected output (NOT RUN): 0. Read-only model listing in a newly initialized local database; not executed.
How it works
MLflow 3.x can register a logged model and use aliases for named references. Registry functionality requires an appropriate database-backed store; verify the exact release, migration requirements and backend permissions. A logged model is not automatically an approved release. Model IDs, registered model name/version and run IDs refer to different things. A version can be tagged as a candidate, while an alias can be reassigned; capture the resolved version and verified artifact digest in any approval record. Updating an alias is not proof that a serving system has reloaded it. Promotion requires independent tests, security and license review, approval and rollback planning. This lesson intentionally does not register any model because registry operation is not approved and MLflow is unavailable. The native snippet only constructs a client and reads an empty isolated registry. The dictionary example illustrates mutability, not actual MLflow behavior.
Mutable pointer analogy
aliases={"candidate":2}recorded=aliases["candidate"]aliases["candidate"]=3print(recorded,aliases["candidate"])Expected output (locally tested): 2 3. The captured version remains distinct from the new pointer.
Common mistakes
Do not equate a registry entry or an alias called champion with deployment permission; do not silently load a mutable alias in a reproducibility audit.
Practice and next steps
Given a candidate alias pointing to version 2 today and version 3 tomorrow, specify what to record to repeat today’s evaluation.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Registry and aliases — knowledge check
Apply registry and aliases to small examples and debugging scenarios.
What is an alias?
What should an audit capture?
What backend is required for OSS registry workflows?
Does registering a model approve deployment?
What is done in this chapter?