Where we start
Most launch reviews argue about the model's accuracy and wave the rollout through as an engineering detail. It is the other way round. Accuracy was measured on yesterday's data, offline. The rollout is the first time the model sees today's inputs, computed by today's pipeline, and the first time anyone acts on what it says. How that first contact is staged decides how much a mistake costs, how quickly you find it, and whether finding it means an apology or a one-line switch.
★ What you walk out with tonight. A one-page rollout plan for one model: the degree of automation it starts at and the one it should stop at, the deployment pattern and the reason for it, each stage with its traffic share and its promotion gate, the skew check that runs during shadow, and a rollback with a trigger, an owner, a time and the date it was last rehearsed.
How much of the decision does the model make?
5 min liveBefore choosing how to deploy, decide what the model is for once it is deployed. Andrew Ng's Machine Learning in Production lectures lay out five degrees of automation, from a human deciding everything to the model deciding everything (reported, from compiled lecture notes). The two steps in the middle keep a human in the loop. The decision a leader signs here is not "do we automate?" but "which step do we aim for, and which step do we stop at?"
LiveThe five steps, and what the human does at each2 min▶
| Step | Who decides | What the human does |
|---|---|---|
| Human only | A person, every case | Everything. This is today's process and the baseline the model has to beat |
| Shadow mode | Still the person | Works exactly as before; the model runs alongside, and its output is logged, never shown or used |
| AI assistance | The person, with a suggestion | Sees the model's answer and decides; the model speeds the person up |
| Partial automation | The model when it is confident, the person otherwise | Takes the cases the model is unsure about |
| Full automation | The model, every case | Audits samples, handles complaints, owns the off switch |
Ng's lectures call the two middle steps "human in the loop" (reported). They are where most of the value sits for the fewest surprises: the model does the easy, confident volume, and people keep the cases where a wrong answer costs the most.
LiveChoose the step by the cost of an error and how often the model is sure2 min▶
Two numbers pick the step. The first is the cost of one wrong decision acted on without a person checking it. The second is the share of cases where the model is confident enough to be trusted alone, measured on your data, not assumed. A high error cost and a small confident share point to AI assistance. A moderate cost and a large confident share point to partial automation. Full automation needs a low error cost, or a confident share so large and so well measured that the remaining human review would add nothing.
You can stop at any step. Full automation is not the goal by default; for many decisions partial automation is the finished product, because the human queue is exactly where the expensive errors would have gone. Write the stopping step into the plan now, so that "let's automate the rest" becomes a new decision later rather than a drift.
Self-studyMove up one step at a time, each with a promotion criterion2 min▶
Each step up is its own launch. Give every move a written criterion before it happens: shadow to assistance when the model agrees with the human on enough cases and its disagreements are reviewed; assistance to partial when the people using it accept its confident answers almost always and the confidence threshold has been set on logged data; partial to full only if the human queue has stopped catching anything the model got wrong. The thresholds are yours to set and they will differ by decision. What must not differ is that each one is written before the move, not argued after it.
A model that watches the inspector first. Ng's own example of shadow mode is a visual inspection system on a production line (reported, from compiled lecture notes). A human inspector keeps checking parts as before. The model runs in parallel on the same parts, and its verdicts are logged and not used for anything. Only when the logged verdicts are compared with the inspector's and found good enough does the model get to influence a decision at all. The leader's signature at this step costs almost nothing: no customer ever sees a shadow prediction.
Three ways to meet real traffic
6 min liveOnce the step is chosen, the deployment pattern decides how traffic reaches the new model. Ng's lectures teach three (reported). Shadow mode copies every request to the new model and serves the old answer. A canary sends a small share of traffic to the new model, "maybe 5% (or even less of traffic initially)", and the rest to the old one. Blue-green keeps two full stacks and switches between them, which makes rollback easy. The decision here is which risk you are buying down: not knowing, blast radius, or time to undo.
LiveShadow: what it proves, and what it cannot2 min▶
A shadow run puts the new model on real inputs, computed by the real serving pipeline, at real load. It proves three things cheaply: whether the features it sees live match the ones it was trained on (training/serving skew, Part 3), how often it agrees with the old model or the human, and whether it meets its latency budget under real traffic. Nobody is affected if it is wrong.
What it cannot prove is the effect of acting on its predictions. Its answers are never used, so the world never reacts to them: no customer changes behaviour, no downstream team works a different queue, no feedback loop starts. If the value of the model depends on what happens after the decision, shadow mode tells you nothing about that value. Only live traffic does, which is what the canary is for.
LiveCanary: what it limits, and the rule you need before it starts2 min▶
A canary limits the blast radius. If the new model is wrong in a way shadow could not show, only the small share of traffic routed to it is hurt, and for only as long as the canary runs. It also gives you the first measurement of the model's real effect, on a sample, with the old model serving the rest as a live comparison.
The canary is only as good as the promotion rule written before it starts: the metrics the new model must clear against the old one on the same period, the minimum duration or volume before anyone looks, and the result that sends it back. A canary without that rule becomes a slow full launch, promoted because nothing loud went wrong.
LiveBlue-green: instant rollback, and what it costs1 min▶
Blue-green runs two complete serving stacks. All traffic goes to one; the switch moves it to the other. The old stack stays warm, so rolling back is one switch, not a redeploy. The price is running two full stacks for as long as you want that option, and the discipline to keep the old stack truly deployable: same feature pipeline, same dependencies, still passing its checks. A blue stack that quietly rotted is not a rollback.
Self-study"All at once" is a legitimate choice, sometimes2 min▶
Switching all traffic in one move is not reckless by definition. It is the right call when a wrong prediction is cheap and reversible (a ranking tweak, an internal dashboard, a recommendation a person glances past), when traffic is too thin for a small share to tell you anything in a useful time, and when the old model can be restored quickly by redeploying it. What makes it safe is not the pattern; it is a rollback plan that exists before the switch, a monitor that would notice the problem, and an owner who is on call the day it ships.
Even at Google, these are not a given. The ML Test Score paper lists a canary test and a rollback test among its 28 production tests, and reports what its authors found when they met 36 teams across Google: "none of these tests was implemented by more than 80% of teams". Staged rollout and quick rollback sound like hygiene. In practice, at one of the most mature ML organisations there is, some teams did not have them. A leader should ask for them by name rather than assume them.
Write the rollback before the rollout
4 min liveThe pattern follows from three questions, asked in order. The first is whether a person makes this decision today, because if one does, shadow mode is almost free and you should take it. The rest is about what a mistake costs and how fast you must undo it. Whatever the answer, the plan has one line that is not optional: how you roll back, who pulls it, and how long it takes.
LiveRollback has to be rehearsed, not just possible2 min▶
The ML Test Score puts rollout and rollback in its infrastructure section. Infra 6 is the canary test. Infra 7 reads: "Models can be quickly and safely rolled back to a previous serving version." Both halves of that sentence are tests a team can fail. "Quickly" means somebody has timed it. "Safely" means the previous version still works with today's feature pipeline and today's dependencies, which you only know if you tried.
A rollback nobody has run is a hope. Rehearse it on a quiet day, time it, and write down who can pull it without asking anyone. In the ML Test Score's scoring, a rollback done by hand and documented earns half a point; one that runs automatically and repeatedly earns the full point.
LiveTraining/serving skew, and why shadow is the cheapest place to catch it2 min▶
Monitoring test 3 of the ML Test Score is "training and serving are not skewed": the features the model sees live are computed the same way as the features it was trained on. Among the 36 Google teams the authors met, they call it "Perhaps the most important and least implemented test". It is common because the same feature is usually computed twice, once in a batch pipeline for training and once in the serving path, by different code, sometimes by different teams.
Shadow mode is the cheapest place to catch it. The model is running on live inputs, nobody is acting on its output, and you can recompute the training-pipeline version of every served feature on the same rows and compare. Skew found in shadow costs a fix. Skew found in a full launch costs the decisions made on it. Statistical drift tests on the live inputs belong to Model Evaluation b9 ↗.
Self-studyZinkevich's three rules against skew3 min▶
Martin Zinkevich's Rules of Machine Learning spend three rules on the problem. Rule 29: save the features as they were at serving time and log them, so the model can be trained on exactly what it saw. Rule 32: re-use code between the training pipeline and the serving path, so there is one computation of each feature, not two. Rule 37, "Measure Training/Serving Skew": compare how the model performs on the data it was trained on, on held-out data, on next-day data and live. A gap between next-day data and live data "probably indicates an engineering error", because those should behave the same if the pipelines agree.
Rules 29 and 32 prevent skew; Rule 37 detects what gets through. A rollout plan should say which of the three you have.
The test most teams skip is the one that bites at launch. Of the 28 tests in the ML Test Score, the authors single out one after meeting 36 Google teams: training/serving skew, "Perhaps the most important and least implemented test". Zinkevich gives the practical tell in Rule 37: when a model does well on next-day data and worse live, the likeliest cause is not the world, it is an engineering error between two pipelines. Both come from people who ran production ML at scale, and both point at the same thing a shadow run can show before anyone is affected.
The rollout plan
★ 22 min · everyone buildsPick one model that is about to ship, or one that shipped all at once and should not have. If you have none, use the Elec2 price-direction model from session 4. Six blocks, each copied into a document and filled in. The plan is finished when a person who was not in the room could run the rollout and the rollback from it.
Name the step you start at and the step you stop at. From Part 1. The stopping step is the one that tends to go unwritten, and it is the one that stops "just automate the rest" from happening by drift.
Pick the pattern by answering the three questions. Write the answers, not only the result. If the answer to Q1 is yes, the plan starts in shadow, whatever comes after.
Lay out the stages. A share of traffic, a minimum duration or volume before anyone reads the numbers, and what is logged. A canary share with too little traffic behind it tells you nothing in a week; size the duration to the volume.
Write the promotion gate for each stage. Numbers the new model must clear against the old model on the same period, and against the no-model baseline from session 2. If the new model cannot beat "do what the rule does today", it should not be promoted, however good it looked offline.
Write the rollback. Four lines, and the last one is the one leaders should ask to see. A rollback with no rehearsal date has not been tested.
Name the skew check that runs during shadow. List the features computed in two places, the training pipeline and the serving path, and how each is compared. These are the features Rule 32 would have you merge into one computation.
A shadow comparison you can run in a day. During the shadow stage the serving path logs, for every request, the features it used and both models' predictions. This script reads that log, measures how often the two models agree, then recomputes each feature with the training pipeline on the same rows and flags any feature whose serving-time mean drifts from the training-pipeline mean by more than a tolerance you set.
A mean difference is the first, cheapest check; a feature can match on average and still differ row by row, so look at the flagged ones by hand. The serving path, the router, the log itself and the deploy scripts are built in DataOps session b6 ↗.
Time the rollback with a stopwatch, not an estimate. Put the measured minutes and the rehearsal date on the plan's first line. Session 6 asks whether a model should still be running, and "we can switch it off in four minutes, we did it last month" is a much stronger answer than "we could roll back if we had to".
Before session 4
30 min- Place one live model on the automation ladder, and write the step you would stop at, with the reason. If the model is at full automation and the honest answer is "partial", that is a finding.
- Draw the traffic path for your current deploy. Where a request enters, what decides which model answers it, and whose answer is served. If nobody can draw it, you are deploying all at once without having chosen to.
- Rehearse a rollback and time it. On a quiet day, in the real environment or the closest thing to it. Write down the minutes, the person who did it, and anything that surprised them.
- List the features computed in two places. For each, name the training source and the serving source. The list is the start of your skew check and of a Rule 32 conversation with the team that owns the serving path.
Three questions
Clear all three and session 3 gets stamped in your passport.
1 · A team ran the new model in shadow mode for a month and wants to skip the canary because "shadow already proved it works". What can shadow mode not tell them?
Shadow runs on real inputs at real load, so it can show skew, agreement and latency. Its answers are never served, so it cannot measure what happens when they are. That is what the canary is for.
2 · Why does the ML Test Score single out training/serving skew among its 28 tests?
Every test scores the same, and the final score is the minimum of the four sections. Skew is singled out because it matters most and was the least often in place, often because a feature is computed by two different pieces of code.
3 · A credit analyst approves every loan today. One wrong automated approval is expensive. Which rollout fits?
A person already makes the decision, so shadow mode is almost free and compares the model with the analyst on real cases. The high cost of an error then argues for a small canary before any wider share.
What this session teaches, and where it came from
Every fact on this page, and its verification tier, is recorded in the course's source map.
Session 3 cheat sheet · pin this
Session 4 is bench night. The model is out, and the world keeps moving under it. Eight retrain policies, from never to every step, are replayed on real electricity-market rows, each with its accuracy and its price, so the retrain decision stops being a gut feeling and becomes a number you can sign.