Register Your First Model Version
Push a trained model into the MLflow Model Registry.
Register Your First Model Version is a free MLOps Academy lesson on CoddyKit — lesson 1 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.
What a Registry Is
A model registry is a central catalog for your trained models. Instead of files scattered on laptops, every model lives in one place with a version number. 📚
Runs vs Registered Models
An MLflow run records one training attempt. A registered model is a named entry that points at the best run you choose to promote and keep.
Log Before You Register
You always log a model first inside a run. Logging saves the artifact so the registry has something concrete to point back at later.
import mlflow
with mlflow.start_run():
mlflow.sklearn.log_model(model, "model")Register in One Call
The fastest path is the registered_model_name argument. Pass it to log_model and MLflow creates the registry entry and a first version for you.
mlflow.sklearn.log_model(
model, "model",
registered_model_name="churn-classifier")Versions Start at 1
Your first registration becomes version 1. Every later registration under the same name bumps the version automatically, so history is never overwritten.
Register From a Past Run
Already logged a model? You can register it after the fact by pointing at its run URI with mlflow.register_model.
mlflow.register_model(
"runs:/<run_id>/model",
"churn-classifier")The runs URI
That runs:/ URI is how MLflow finds the artifact. It combines the run id and the artifact path you used when you logged the model.
The Tracking URI
Set the tracking URI so your code talks to the right server. Without it, MLflow registers everything to a local mlruns folder instead.
mlflow.set_tracking_uri(
"http://localhost:5000")See It in the UI
Open the MLflow UI and click the Models tab. Your new model name appears there with version 1 listed under it, ready to inspect.
Names Are Identifiers
Pick a clear, stable name like fraud-detector. Teammates and code load models by that name, so renaming later breaks everything pointing at it.
Confirm With the Client
The MlflowClient lets you verify registration in code. Fetch the model by name and read back the versions that exist.
from mlflow import MlflowClient
c = MlflowClient()
print(c.get_registered_model("churn-classifier"))Quick Check
Let us check how a first registration is numbered.
Recap
You logged a model, gave it a registry name, and got version 1. Now your best model has a home that anyone on the team can find. 🎉
Frequently asked questions
Is the “Register Your First Model Version” lesson free?
Yes — the full text of “Register Your First Model Version” 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 “Register Your First Model Version”?
Push a trained model into the MLflow Model Registry. 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 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Register Your First Model Version” 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
- Register Your First Model Version
- Stages: Staging, Production, Archived
- Add Tags and Descriptions to Models
- Load a Model Back by Name and Stage