Model Registry and rollouts
Professional Machine Learning Engineer · Lesson 13 of 19 · 1:38:24
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Google Cloud Professional Machine Learning Engineer exam, on the official exam guide. In this lesson: Model Registry (custom, AutoML, and BigQuery ML models), versions and aliases, traffic splits for canary rollouts and A/B tests, rollbacks, rolling deployments, and custom inference routines for preprocessing and postprocessing. Includes three original practice questions, with Cymbal Insurance, a fictional car and home insurer, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Version three is ready
Version three of Cymbal Insurance's fraud model is ready, while version two still serves every claim. If version three turns out worse, the claims app suffers at once. And the app sends raw claim data, while the model expects scaled numbers, and returns a bare score that nobody can act on.
Model Registry
Model Registry is the central place for your models. It holds custom models and AutoML models, and BigQuery ML models can be registered without any export. Each model page shows its versions, their evaluation metrics, their labels, and where they are deployed. From a version, you can evaluate it, deploy it to an endpoint, or start a batch inference job.
Versions and aliases
Each retraining creates a new version of the same model, rather than a new model. An alias is a readable name on one version, like champion or challenger. The default alias marks the version used when nobody names a version, so it usually points to the version approved for production. Promoting or rolling back then means moving an alias, with no change to the code that uses the model.
Rollout strategies
An endpoint can serve several model versions at once, with a traffic split between them. In a canary rollout, the new version first gets a small share of the traffic, like five percent, and that share grows step by step while the metrics hold. In an A B test, two versions share the traffic for a while, so the team can compare their results on real requests. If the new version misbehaves, the traffic goes back to the old one, which is still deployed. And a rolling deployment can also replace a deployed model gradually, on the same resources.
Preprocessing and postprocessing
Real requests rarely match what the model expects. Custom inference routines let you add preprocessing and postprocessing code, and build the serving container without writing an HTTP server. You implement a predictor, with steps to preprocess, predict, and postprocess, and optionally a handler that sees the raw request. Preprocessing can scale numbers or fetch extra data, while postprocessing can format the answer or apply business rules, like turning a score into review or approve.
Recap
Let's recap. Model Registry holds custom, AutoML, and BigQuery ML models, with versions, metrics, and labels. Each retraining adds a version, and aliases, including the default alias, point to versions. Moving an alias promotes or rolls back, with no code change. A traffic split on one endpoint supports canary rollouts and A B tests, and makes rollback quick. And custom inference routines add preprocessing and postprocessing, without writing a web server.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Nightly batch jobs always use the version approved for production, and never name a version. The team wants to promote version three without touching the jobs' code. What should it do?
- Register version three as a new model
- Move the default alias to version three
- Edit each job to name version three
- Add a description to version three
Show the answer
Move the default alias to version three
The jobs use the default version, so moving the default alias to version three promotes it at once. “Register version three as a new model” would split one model's history into two models, and the jobs would still use the old one. “Edit each job to name version three” would change the code, which the team wants to avoid. And “Add a description to version three” would only describe the version, without promoting it.
Version three must first receive 5% of real claims, then more, only if its error rate stays low. Version two keeps serving the rest. What should the team set up?
- Replace version two on the endpoint
- A batch job on last year's claims
- A second endpoint for version three
- A 95/5 traffic split on the same endpoint
Show the answer
A 95/5 traffic split on the same endpoint
A traffic split on the same endpoint sends five percent to version three, and it can grow, or go back to zero. “Replace version two on the endpoint” would send every claim to version three at once. “A batch job on last year's claims” would test the model, but on old data, not on real claims. And “A second endpoint for version three” would give version three no traffic unless the app's code chooses an endpoint.
The app sends raw claim data, the model needs scaled numbers, and the app wants “review” or “approve” instead of a score. The team does not want to write a web server. What should it use?
- A custom inference routine
- Scaling code in each calling app
- A different training algorithm
- A monthly batch inference job
Show the answer
A custom inference routine
A custom inference routine adds preprocessing and postprocessing to the serving container, with no HTTP server to write. “Scaling code in each calling app” would leave each app to scale data and read scores in its own way. “A different training algorithm” would change how the model learns, not the format of its inputs and outputs. And “A monthly batch inference job” would only give monthly answers, not answers for each claim.