MODULE 23 · Middle+ · 3 hours

Who fixes the model at three in the morning

The model beat every baseline, so the easy part is over. Next come pipelines, an honest experiment, monitoring and the question of who is accountable for it.

Open this module in the simulator All 23 lessons

The first two modules are free, no card. The rest are $20/month.

🏢 The situation

The SuperMegaRetail demand model beat every baseline. Victor:

"Congratulations, the easy part is over. Now comes what separates a system from a model: training pipelines, an honest experiment, integration into procurement processes, monitoring, and the answer to 'who fixes it at 3 am'. Finish the design doc — this is your exam for a true middle with a senior trajectory."

🎯 Your task

  1. Separate the training pipeline from the inference pipeline; understand the feature store's role.
  2. Design the A/B experiment and the results report (debrief).
  3. Build four-level monitoring and distinguish the drift types.
  4. Design the fallbacks, the release cycle and the system's ownership.

📚 Theory

Training pipeline ≠ inference pipeline

Training and inference are different systems with different requirements:

Training Inference
Runs on schedule/trigger 24/7 or in batches before the order deadline
Requirements reproducibility, cheap replays latency, reliability, fallbacks
Danger silent data degradation a service outage at peak hour

Their common point is the features: they must be computed identically in both (otherwise training/serving skew). Hence a feature store or, at minimum, a shared feature library + logging the actual inference features.

The training pipeline must be testable: unit tests on transformations, property-based tests ("forecast ≥ 0", "shares sum to 1"), a smoke training run on a sample in CI.

The system's A/B test and the debrief

Designing the experiment for a demand forecast is non-trivial: the randomization unit is not a user but a store (spillovers within a store). Key decisions from the book:

Monitoring: four levels and the drift types

The book splits ML system monitoring into levels: incoming data → the model → the model's output → decision-making. Plus ordinary service health (latency, errors).

Gradual drift behavior changes slowly: scheduled retraining

Sudden drift lockdown, process change, release: alert + fallback + rebuild

Recurring drift seasons, holidays, weekdays: design it into the system

The three types of concept drift and the response to each: gradual is cured by scheduled retraining, sudden by alerts and a fallback, recurring by building it into the model itself.

The vocabulary interviews ask about:

Responses: retrain on fresh data, rebuild the model, switch to the fallback. To find the retraining cadence — an "aging test": train the model on data up to T and measure the quality decay as you move away from T.

What to remember

  • Training and inference are different pipelines with shared features; skew kills silently.
  • A/B for systems: the randomization unit ≠ the user; a debrief document is mandatory, even (especially) for negative results.
  • Drift comes as data / concept / output; the drift type dictates the response.
  • The fallback hierarchy and ownership (accountability, bus factor, runbook) are what make a system durable.

Next in this module: Practice

A step-by-step walkthrough of the solution, the code and a five-question quiz.

Open the module →

Nearby lessons

22 Advanced · Metrics, data, validation, baselines

The whole program — 23 lessons