Code written for MLflow 2.x calls `transition_model_version_stage` and loads `models:/room-rate/Production`; what replaces each when moving to MLflow 3.16?
answer
- deprecated, not yet removed
- pointer, status and environment were one field
- since 2.9.0, still deprecated in 3.x
- aliases, version tags, separate registered models
- get_latest_versions only to read old state
basics
~20 sRegistry stages have been deprecated since MLflow 2.9.0 and still are in 3.16. Replace the Production stage with an alias such as champion loaded by models:/name@champion, stage-as-status with model version tags, and stage-as-environment with separate registered models.
solid answer
~40 sStages bundled three jobs into one field, and MLflow 3.16 splits them. As a **pointer**, `models:/room-rate/Production` meant the most recent version in that stage; it becomes an alias, `set_registered_model_alias("room-rate", "champion", v)`, loaded as `models:/room-rate@champion`. As a **status** ("in Staging, being validated"), it becomes a model version tag such as `validation_status`. As an **environment**, it becomes separate registered models such as `room-rate-staging` and `room-rate-prod`, with permissions set on each and `copy_model_version` to move a version across. `transition_model_version_stage`, `get_latest_versions` and `get_model_version_stages` all carry `@deprecated(since="2.9.0")` and still run in 3.16, which is why old code keeps working while it warns. The migration is to set aliases on today's stage holders once, switch consumers to the alias URI, then stop calling stage APIs.
code
python · 14 linesfrom mlflow import MlflowClient
client = MlflowClient(tracking_uri="http://mlflow.internal.example:5000")
name = "room-rate"
# One-off migration: pin today's stage holders under aliases.
# get_latest_versions is deprecated since 2.9.0; it is used only to read the old state.
for stage, alias in [("Production", "champion"), ("Staging", "candidate")]:
holders = client.get_latest_versions(name, stages=[stage])
if holders:
client.set_registered_model_alias(name, alias, holders[0].version)
# Consumers then replace models:/room-rate/Production with:
model_uri = "models:/room-rate@champion"go deeper
Recall that registry stages are deprecated and that aliases such as champion and version tags replace them.
Map each stage job to its replacement: pointer to alias, status to version tag, environment to separate registered models.
Plan the cut-over: pin aliases from current stage holders once, switch consumers and writers, and know which stage behaviours have no direct equivalent.
Decide between promoting model versions across per-environment registered models and promoting training code into each environment, weighing permissions and reproducibility.
## Where stages stand in MLflow 3.16 **Model registry stages** (`None`, `Staging`, `Production`, `Archived`) were deprecated in **MLflow 2.9.0**. In 3.16 they are still deprecated, not removed: the client methods carry `@deprecated(since="2.9.0")` with the warning that "Model registry stages will be removed in a future major release". Deprecated calls include: - `MlflowClient.transition_model_version_stage(name, version, stage, archive_existing_versions=False)`; - `MlflowClient.get_latest_versions(name, stages=None)`; - `MlflowClient.get_model_version_stages(name, version)`; - stage URIs such as `models:/room-rate/Production`, which load the most recent version in that stage. Old code therefore keeps running in 3.16 and emits deprecation warnings. That is the trap: it works until the major release that removes it. ## Why stages were replaced A stage did three jobs in one field, which is why it was inflexible: | Job the stage did | Replacement in 3.16 | Call or form | |---|---|---| | **pointer**: "load the Production model" | model version **alias** | `set_registered_model_alias`, `models:/<name>@champion` | | **status**: "this one is being validated" | model version **tag** | `set_model_version_tag(..., "validation_status", "pending")` | | **environment**: "this is the prod model" | separate **registered models** | `room-rate-staging`, `room-rate-prod`, plus `copy_model_version` | The migration guide adds two properties stages lacked: a version can carry **more than one alias**, and per-environment registered models can have **access controls**, which a stage never could. ## Migrating step by step 1. **Choose an alias per stage.** For example `champion` for `Production` and `candidate` for `Staging`. 2. **Pin today's holders once.** For each stage, read the latest version with `get_latest_versions(name, stages=[stage])` and set the alias on it. This is the one place a deprecated call is still useful: reading the old state you are migrating from. 3. **Switch consumers.** Replace `models:/room-rate/Production` with `models:/room-rate@champion` in batch jobs, services and `mlflow models serve` commands. 4. **Switch writers.** Replace each `transition_model_version_stage(..., "Production")` with `set_registered_model_alias(..., "champion", version)`, and stage-as-status writes with version tags. 5. **Split environments if you need permissions.** Create per-environment registered models and promote with `copy_model_version("models:/room-rate-staging@candidate", "room-rate-prod")`, or promote the training code so each environment trains into its own registered model, which the guide recommends for mature setups. 6. **Stop reading stages.** Remove `get_latest_versions` and `current_stage` checks once nothing writes stages. ## Behaviours that change under your feet - **No automatic "most recent in stage".** `models:/room-rate/Production` picked the newest version in that stage. An alias names exactly the version you set, and registering a newer version does not move it. - **`archive_existing_versions` has no alias equivalent, and needs none.** With stages you archived the old Production version so only one remained. Moving an alias already takes it off the previous version, because an alias name exists once per registered model. - **Several versions could share a stage; an alias cannot be shared.** If two versions were both in `Production`, decide which one gets `champion`. A second alias can mark the other. - **Rollback becomes explicit.** Instead of transitioning stages back, point the alias at the previous version; keep a `previous-champion` alias or a tag so you know which one that is. ## Proving nothing still uses stages Before declaring the migration done, look for every stage-shaped call, not only the obvious one: - `transition_model_version_stage` and `get_latest_versions` calls in training, release and notebook code. - `get_model_version_stages` and reads of `ModelVersion.current_stage` in dashboards or checks. - Stage URIs ending in `/Production`, `/Staging` or `/Archived`, including in `mlflow models serve -m` commands and deployment manifests. - `set_model_version_tag(..., stage=...)`: its `stage` argument tags the latest version in a stage, so it is stage-shaped too even though the method itself is current. - Deprecation warnings mentioning stages in job logs, which point at whatever the search missed. ## What not to do - Do not build new pipelines on `get_latest_versions` or stage URIs because they still work in 3.16. - Do not treat a `Staging` tag as an environment boundary; permissions attach to registered models, not tags. - Do not leave both systems live: a consumer reading the stage and another reading the alias will drift apart the first time someone updates only one.
- Does `transition_model_version_stage` still work in MLflow 3.16?Yes. It is decorated `@deprecated(since="2.9.0")` and still runs, emitting a warning that stages will be removed in a future major release. Code relying on it is working on borrowed time rather than broken today.
- Two versions of `room-rate` are both in `Production`. What do you do when migrating?An alias names one version, so choose which version takes `champion`, normally the one `models:/room-rate/Production` resolved to, the most recent. If the other must stay addressable, give it its own alias. The migration guide's helper uses `get_latest_versions(..., stages=[stage])[0]` for exactly this choice.
- Registry stages were removed in MLflow 3.0, so stage code fails immediately.
- An alias, like the Production stage URI, always resolves to the newest version.
- Moving an alias still needs archive_existing_versions to clear the old version.
- A Staging tag gives the staging environment its own access control.
- get_latest_versions is the recommended way to find the production model in 3.x.
Assumes MLflow 3.16; registry stages and their client calls have been deprecated since MLflow 2.9.0 and are still present, with warnings, in 3.16.