Where we start
Session 4 priced a retrain and showed that an alarm is one of the cheapest ways to buy accuracy back. That alarm only works if three things are true: it watches something that moves when the model goes wrong, somebody acts when it fires, and the thing it watches is not being shaped by the model itself. Tonight is those three things in order. None of them is a dashboard question. Each is a decision about attention, which is the scarcest thing an operations team has.
★ What you walk out with tonight. An alert-to-action table for one real ML system: every signal with its threshold, its action, its owner and the cost of acting, the rows with no action struck out, and one guard against the model choosing its own labels. Plus the sentence that ends most monitoring debates: "if nobody would do anything when this fires, we are not going to page anyone about it."
Most of what you can watch arrives before the truth does
5 min liveThe decision first: which of the things you watch can tell you the model is wrong, and how late. A leader who does not ask gets a wall of green charts that are all measuring the plumbing. The mechanism is the label delay from session 4. Between the moment a prediction is served and the moment its true outcome lands, three layers of the system are already visible. The fourth, the one everyone actually cares about, is not.
LiveNg's method: start from what could go wrong2 min▶
Andrew Ng's Machine Learning in Production lectures teach monitoring as a brainstorm before it is a dashboard (reported, from compiled lecture notes). Sit down with the team and list everything that could go wrong. Then pick metrics in three families: software metrics such as memory, compute, latency, throughput and server load; input metrics that describe the distribution of what the model is fed; and output metrics that describe what the model returns. Set a threshold on each, and expect to adapt both the metrics and the thresholds over time as you learn which ones move when something real happens.
The last step is the one most teams skip. A threshold set on launch day is a guess. Treating it as permanent is how a channel fills with alerts nobody reads, and Part 2 is about pricing that.
LiveThe seven monitoring tests in the ML Test Score2 min▶
Breck and colleagues give monitoring its own section of seven tests, scored like the other three: half a point by hand and documented, a full point automated. Session 1's constructed readiness sheet scored this section lowest, at 1.0 of 7, and that is the shape to check your own sheet against; the paper itself does not rank the sections by how often teams fail them.
| # | Monitoring test | Visible before labels? |
|---|---|---|
| 1 | Dependency changes result in notification | Yes |
| 2 | Data invariants hold for inputs | Yes |
| 3 | Training and serving are not skewed | Yes |
| 4 | Models are not too stale | Yes, as model age |
| 5 | Models are numerically stable | Yes |
| 6 | Computing performance has not regressed | Yes |
| 7 | Prediction quality has not regressed | No: it needs labels |
Six of seven can alarm on the day something breaks. Only the seventh measures the thing the business pays for, and it is the one that runs a label delay behind.
LiveThree kinds of shift, and which one an input monitor can see1 min▶
Chip Huyen's blog post on data distribution shifts gives the cleanest definitions (read, blog). Covariate shift: P(X) changes while P(Y|X) stays the same; the inputs move, the rule linking them to the outcome does not. Label shift: P(Y) changes while P(X|Y) stays the same; the mix of outcomes moves. Concept drift: P(Y|X) changes while P(X) stays the same; the same inputs now mean a different outcome.
Ng's lectures use a simpler pair (reported): data drift when the distribution of x changes, concept drift when the mapping from x to y changes. He uses the two words loosely at times, so when a team says "drift", ask which one they mean.
The practical consequence is in the figure. An input monitor sees covariate shift, because it is by definition a change in the inputs. It cannot see concept drift, because the inputs have not moved: the only place concept drift shows up is performance against labels, after the labels land. Label shift sits between them; the output distribution may hint at it, but confirming it takes labels too.
Self-studyWhere the statistics and the pipeline monitors live2 min▶
This session decides what to watch and why. How to measure a distribution change, which statistic, which test, which window, is taught in Model Evaluation b9, drift and continuous evaluation ↗. Monitors on the pipeline feeding the model, freshness, volume and schema, are taught in Data Observability a2, the five signals ↗. Both plug into the input row of the figure; neither changes the rule that performance waits for labels.
Thirty-six Google teams, and the test they skipped. When Breck and colleagues met 36 teams across Google, none of the 28 tests was implemented by more than 80 percent of them. The one they single out as "perhaps the most important and least implemented" is a monitoring test: training and serving are not skewed. It needs no labels at all; it compares the features the model sees live with the features it was trained on. The decision a leader signs here: before any accuracy dashboard is funded, the three rows that need no labels are live, and the team can say out loud how long row four is blind.
An alert without an action is noise
6 min liveThe decision first: for every alert, what happens when it fires, and who does it. If the honest answer is "someone looks at it", the alert is a chart with a sound attached. The mechanism is a chain of four links: a signal, a threshold on it, an action the threshold triggers, and a person who owns the action. Break any link and the alert still fires; it just stops meaning anything.
LiveSculley: what to monitor, and three places to look2 min▶
In the section of the hidden-technical-debt paper on changes in the external world, Sculley and colleagues write: "Comprehensive live monitoring of system behavior in real time combined with automated response is critical for long-term system reliability." Then: "The key question is: what to monitor?" They name three starting points (read).
- Prediction bias. In a system working as intended, the distribution of predicted labels should match the distribution of observed labels. A change there is a cheap, early sign that the world has moved. It is not a sufficient test: a null model that predicts the average label for everything passes it perfectly. Slice it by segment and it becomes much sharper.
- Action limits. Where the system takes actions in the world, bidding, approving, blocking, set limits on those actions as a sanity check, and alert when one is hit. The limit is a floor under a model going wrong fast.
- Up-stream producers. Data flowing in from other teams' systems should be monitored against its own expectations, and those producers' alerts should reach the team that consumes the data. Session 1's unstable data dependencies, made operational.
Note the word "automated response". The paper pairs monitoring with action from its first sentence on the subject.
LiveAn alert threshold is a spending decision: the bench shows it2 min▶
Session 4's bench already priced this, on real Elec2 rows at a one-day label delay. The alarm policy that refits when four-week accuracy on labelled rows falls 10 points below where it started retrains 6 times and scores 72.78 percent. Now make it a hair trigger: fire on any dip at all, watching only the last day. It retrains 209 times and scores 72.79 percent.
| Alarm | Retrains | Accuracy | Correct rows |
|---|---|---|---|
| 10 points, 4-week window | 6 | 72.78 | 10,666 |
| Any dip at all, 1-day window | 209 | 72.79 | 10,668 |
The extra 203 retrains buy 2 correct rows out of 14,656. Every one of those retrains is an alert somebody acted on. A threshold decides how often the team is interrupted and how much compute is spent, long before it decides accuracy.
Reproduce it. Open session 4's bench, keep labels at 1 day and refits on all labelled history, then set Retrain to "on an alarm", Alarm when accuracy falls to "any dip at all", and Alarm watches to "1 day". Compare it with the same alarm at "10 points" and "4 weeks".
LiveZinkevich Rule 10: watch for silent failures2 min▶
Martin Zinkevich's Rules of Machine Learning give this failure its own rule, "Watch for silent failures." (read). His examples are the kind no latency chart will ever catch. A feature column that was populated in 90 percent of examples drops to 60 percent, and the model keeps serving, slightly worse, with nothing crashing. A table behind Google Play went stale for 6 months; refreshing it gave "a boost of 2% in install rate".
Both are row 2 of Part 1's figure: an input-side signal, visible without a single label, that nobody was watching. And both have an obvious action: find the upstream owner and fix the feed, which is exactly the second row of the alert chain above.
Self-studyAlert hygiene for the pipeline itself1 min▶
The same discipline, applied to data pipelines rather than models, is taught in Data Observability a4, alert or noise ↗: how to count alerts per week, how to tell a noisy check from a broken one, and when to retire a check. The rule carries over unchanged: a check that never leads to an action is costing attention and buying nothing.
Elec2's constant columns (self-study). The electricity file used on session 4's bench looks clean. Its ARFF header records a ReplaceMissingValues filter, and three inputs, Victoria's price, Victoria's demand and the transfer between states, are constant for the first 17,424 rows, 363 days: their values were missing and filled in before the file was published (measured). A monitor on "share of constant values per input" would have flagged three of the five market inputs the bench uses from day one, with a clear action attached: ask the producer what happened before the model learns a year of nothing. The decision a leader signs here: every alert on the list names its action and its owner, and any that cannot is removed before launch, not after the channel is muted.
When the model grades its own homework
4 min liveThe decision first: how much of your traffic is decided without the model, so you can still learn what the model gets wrong. Without that slice, a model that chooses which cases get acted on also chooses which cases get labelled, and every retrain learns only from the cases it already liked. The monitor looks healthy because it is measured on the same selected cases. Here is the mechanism, drawn for a lending model.
LiveSculley: direct and hidden feedback loops2 min▶
The hidden-technical-debt paper separates two kinds (read). A direct feedback loop: "A model may directly influence the selection of its own future training data." That is the figure: the approvals decide the labels. A hidden feedback loop is harder to find, because it runs between systems: "two systems influence each other indirectly through the world." Two models owned by two teams, each changing the behaviour the other learns from, with neither team's monitor built to see the other.
Neither loop crashes anything. Both can make every monitor in Part 1 look better while the model gets worse on the cases it no longer sees.
LiveHuyen: degenerate loops and feedback loop length1 min▶
Chip Huyen names the failure a degenerate feedback loop: "a system's outputs are used to create or process the same system's inputs" (read, blog). Recommenders are the familiar case; lending, fraud and hiring screens are the expensive ones.
She also names the dial that sets how fast any loop can be caught: feedback loop length, the time from serving a prediction to getting feedback on it. It is session 4's label delay under another name. For fraud she gives a dispute window of "a month to three months" (read, blog). Her book, Designing Machine Learning Systems, covers the same ground at more depth; its text was not read for this session, so nothing here is quoted from it.
Self-studyThree guards against a model picking its own labels2 min▶
- A held-out slice. A small random share of cases is decided without the model, by the old rule or at random within safe limits, and its outcomes are labelled like any other. It costs some worse decisions; it buys the only unbiased view of what the model turns away. Its size is a business choice, and the table in the build-along gives it a row.
- Log what the model did not choose. Store the score and the decision for every case, including the declined ones. You cannot learn their outcomes, but you can see when the share being declined moves, which is an output-row signal from Part 1.
- Measure the label delay, as session 4's homework asked. The loop length tells you how far behind the performance row is, and therefore how long a loop can run before any accuracy alarm could notice.
The fraud model's alarm is always looking at last quarter. Huyen's fraud dispute window, a month to three months, is a label delay. A fraud model's accuracy alarm can only score transactions whose disputes have had time to arrive, so on any given morning it is grading the model that was running up to three months ago. Every row of the alert table that depends on labels inherits that lag. The decision a leader signs here: the size of the held-out slice, and who owns it, written down before the model's first retrain, because the loop starts closing on day one and the labels that would reveal it are months behind.
The alert-to-action table
★ 22 min · everyone buildsPick one ML system you own or are about to approve. If you have none, use the Elec2 price-direction model from session 4; the figure fills its table as a constructed worked example. Six steps, each a block you copy into a document and fill in. The table is finished when every surviving row has an action, an owner and a price, and one row guards against the model choosing its own labels.
Brainstorm what could go wrong, before any metric. Ng's order: the failures first, grouped by where they would show. Ten minutes, with the people who run the system. Write failures, not charts.
Give each failure a signal and say when it becomes visible. "Now" means on the first affected prediction. "After the label delay" means performance: write the delay in hours or days, measured, not guessed.
Set a threshold, and decide now how you will know it is too tight. The honest test is a count: alerts per month, and how many led to an action. Session 4's hair-trigger alarm acted 209 times to buy what 6 actions bought.
Write the action, the owner and the cost of acting. An owner is a person who gets woken up, not a team channel. The cost can be minutes of traffic, an engineer's afternoon, or a retrain priced as in session 4.
Delete every row with no action. Strike it through, keep it on the page for one review so the team sees what was cut, then remove it from the alerting system. A chart can stay on a dashboard; it does not get to page anyone.
Write the feedback-loop guard. Does the model decide which cases get labelled? If yes, name the held-out slice: its share, how cases enter it, what it costs, and who owns it. If no, write why, in one sentence.
Keep the table as data next to the model's code, so it is reviewed like code and no alert exists that is not in it. And compute accuracy only on rows whose labels have actually arrived, or the performance row will quietly score predictions against labels that were not there yet.
The dashboards that display these, the routing that pages the owner, and the scheduled jobs that run them are built in DataOps b6, deploy and monitor ↗. The statistics for the input and output rows are in Model Evaluation b9 ↗. Governance of ongoing monitoring, who reviews the table and how often, is in Model Risk p8, ongoing monitoring ↗.
Count before you tune. Before arguing about any threshold, pull last month's alerts and mark each one "acted on" or "not". The ratio is the fastest honest review of a monitoring system there is, and it usually settles the argument on its own.
Before session 6
30 min- Write the brainstorm for one live model with the people who run it, grouped into software, inputs, outputs and performance. Mark each item "now" or "after the label delay".
- Fill the table and delete the rows with no action. Keep the struck rows visible for one review so the team sees what was cut and why.
- Count last month's alerts and how many of them led to an action. Write both numbers at the top of the table. If the second is much smaller than the first, you have found your first thresholds to change.
- Find one feedback loop and write its guard. A place where the model's decisions choose which outcomes you ever see. Name the held-out slice, its size, and its owner, or write why none is needed.
Three questions
Clear all three and session 5 gets stamped in your passport.
1 · Which kind of shift can an input monitor NOT see before the labels arrive?
Covariate shift and a feature going missing are changes in the inputs, visible on day one. Concept drift leaves the inputs alone and changes what they mean, so it waits in the performance row, one label delay behind.
2 · On session 4's bench at a one-day label delay, what did the hair-trigger alarm (any dip at all, watching 1 day) buy over the 10-point, 4-week alarm?
10,668 correct rows against 10,666. An alert threshold decides how often somebody acts, and each action has a price. That is why a threshold is a spending decision before it is an accuracy decision.
3 · A lending model decides which applications are approved, and only approved loans ever produce a repaid-or-defaulted label. Why does it need a held-out slice?
This is Sculley's direct feedback loop and Huyen's degenerate loop. The slice is the only source of labels the model did not choose; its size is a business decision, not a fixed rule.
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 5 cheat sheet · pin this
Session 6 asks the question every earlier session made possible: should this model be running at all? The failure-rate folklore traced back to what its sources actually say, the kill criteria a leader can sign in advance, and the capstone one-page production decision memo. Bring the alert table; its deleted rows and its blind spots are evidence.