
Two workers receive the same input. One predicts 10 and the other predicts 20. Both used the model called champion. The difference is when they loaded it. In MLflow Model Registry, reassigning an alias changes what the next lookup resolves to. A worker that already has a model in memory can keep serving its earlier predictions.
That distinction matters during a rollback. You need to know both which version the registry selects and which version each worker actually loaded. Here’s a small release drill you can run before relying on an alias in production.
We registered two scikit-learn regressors under dispatch-estimator. Version 1 always returns 10 and version 2 always returns 20. Using deliberately simple models makes a stale load visible with a single input. These numbers tell us which model ran. Choosing the better model for a real application requires an evaluation on representative data.
If you still need a training checkpoint, the guide to saving and resuming PyTorch models covers what to save. Here the model is already trained. The registered name groups versions. A numbered URI such as models:/dispatch-estimator/1 selects a specific version. An alias URI such as models:/dispatch-estimator@champion follows the version currently assigned to that alias. A newly registered version can sit alongside the current release until someone moves the alias. See the MLflow registry workflow guide.
Our local test used MLflow 3.5.1, a persistent SQLite database and a disposable S3-compatible bucket. The database held registry metadata, including the alias assignment. The bucket held the model bundles. We gave the tracking server access to the bucket and let clients load artifacts through the server. For a fresh local installation, the equivalent CLI settings are:
mlflow server --host 127.0.0.1 --port 5000 \
--backend-store-uri sqlite:///registry.db \
--serve-artifacts \
--artifacts-destination s3://registry-lab/artifacts
Create the bucket first. For a custom S3 service, configure MLFLOW_S3_ENDPOINT_URL and the appropriate storage credentials on the tracking server. Start it in the directory where you intend to keep registry.db, or supply an absolute database URI. Create a new experiment after configuring artifact storage, since an existing experiment can retain its earlier artifact location. The MLflow artifact-store documentation explains how proxied and direct access work.
In the example, versions 1 and 2 already exist and champion points to version 1. Record the current assignment before promoting the candidate. In a release system, keep that previous version in the release record so a later operator can recover it.
import mlflow
from mlflow import MlflowClient
mlflow.set_tracking_uri("http://127.0.0.1:5000")
client = MlflowClient()
name = "dispatch-estimator"
alias = "champion"
previous = client.get_model_version_by_alias(name, alias).version
client.set_registered_model_alias(name, alias, "2")
Next, open a fresh client process. Resolve the alias once, load the numbered version it returned, and log that number with the prediction. Loading the numbered URI ties your log to the same version even if someone moves the alias between the lookup and the download.
import mlflow
import pandas as pd
mlflow.set_tracking_uri("http://127.0.0.1:5000")
client = mlflow.MlflowClient()
selected = client.get_model_version_by_alias("dispatch-estimator", "champion")
model = mlflow.pyfunc.load_model(f"models:/dispatch-estimator/{selected.version}")
print(selected.version, model.predict(pd.DataFrame({"units": [4.0]}))[0])
In our drill, a fresh client loading the alias returned 10 before promotion and 20 afterward for the same input, units=4. The process that held a reference to the first model still returned 10 after promotion. If your workers load the model at startup, include a reload or rolling restart in the release procedure and check a prediction from each serving group.
In the release process, move the alias back to the version you recorded. Repeat the fresh-client check, then check the serving workers after they reload.
client.set_registered_model_alias(name, alias, previous)
This restart exercise covers persistence. A disaster-recovery test would also need to restore the database and the matching artifacts from backup. If the registry resolves a version but loading fails, check whether the corresponding bundle is readable from the recorded artifact location. If loading succeeds but the live response still comes from the earlier model, inspect the worker’s loaded version.
To evaluate this setup on Compute with Hivenet and Object Storage with Hivenet, repeat the release from a separate worker using its intended permissions. Measure cold-load time with your actual model and confirm the first post-rollback prediction. Our loopback test used small models and an S3 emulator.
Pick one AI, compute, or storage workload and see the difference for yourself. Spin it up in minutes, or let our team map your fastest path to production.