Promote the Best Model to Production
Pick a winner and stage it for serving.
Promote the Best Model to Production is a free MLOps Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MLOps Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Pick a Winner
You now have several registered versions. Promotion is choosing which one your service should actually use, then marking it as Production. 🏆
List the Versions
Use the MlflowClient to fetch every version of a model so you can compare them before choosing.
from mlflow import MlflowClient
client = MlflowClient()
versions = client.search_model_versions("name='churn-classifier'")Compare by Metric
Each version links back to its run, so you can read that run's accuracy and pick the highest scorer programmatically.
for v in versions:
run = client.get_run(v.run_id)
print(v.version, run.data.metrics["accuracy"])Aliases Over Stages
Newer MLflow uses named aliases like champion instead of fixed stages. An alias is a movable pointer to one chosen version.
Set the Champion Alias
Point the champion alias at your best version. Your serving code can then always ask for champion and get the current pick.
client.set_registered_model_alias(
name="churn-classifier",
alias="champion",
version="3",
)Stages Still Work
On older setups you transition a version to the Production stage instead. The idea is the same: mark which one is live.
client.transition_model_version_stage(
name="churn-classifier",
version=3,
stage="Production",
)Archive the Old One
When you promote a new version, move the previous live one aside. With stages that means Archived; with aliases you simply reassign the pointer.
Tag the Decision
Add a tag recording why this version won. Future teammates will thank you for the breadcrumb when they audit the choice.
client.set_model_version_tag(
"churn-classifier", "3",
"approved_by", "data-team",
)Promotion Is Reversible
Because old versions are kept, you can re-point champion back to a previous version instantly if the new one misbehaves. 🔁
Quick Check
What is the main advantage of a model alias like champion?
Serving Stays Decoupled
The big win: your API never names version 3. It asks for the champion, so promotion is a registry change, not a code deploy.
Promote With Confidence
Compare, then promote only what beats the current pick. Tying promotion to metrics keeps weak models out of production.
Recap: Choosing the Live Model
You listed versions, compared metrics, set the champion alias, tagged the reason, and kept the choice reversible. That is safe promotion. ✅
Frequently asked questions
Is the “Promote the Best Model to Production” lesson free?
Yes — the full text of “Promote the Best Model to Production” is free to read here on the web, and the MLOps Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MLOps Academy course, upgrade to CoddyKit PRO.
What will I learn in “Promote the Best Model to Production”?
Pick a winner and stage it for serving. You practise MLOps Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start MLOps Academy?
No prior experience is required. MLOps Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Promote the Best Model to Production” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this MLOps Academy lesson?
Yes. Every MLOps Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Train and Log to the Registry
- Promote the Best Model to Production
- Serve the Production Model
- Trace a Prediction Round-Trip