5.3.15 · D5MLOps & Deployment
Question bank — Model retraining pipelines
Before the traps, this page teaches the vocabulary they use — every symbol below is earned here, not assumed.
Symbols and formulas you need first

The figure below makes the sign-matching visible. Fix the expected fraction at and slide the actual fraction from small to large. The blue curve is the gap ; the yellow curve is the log-ratio . Watch that both are below zero on the left of the dotted line and both above zero on the right — they always match sign. Their product, the green curve (one PSI term), therefore never dips below zero and touches exactly where .

True or false — justify
The world stays still after you deploy, so a well-trained model stays accurate.
False. A model is a snapshot of ; the serving world keeps moving, so accuracy decays even if the code is perfect. See Data drift and concept drift.
Data drift (covariate shift) by itself always forces a retrain.
False. If only moved but is unchanged, the input→output rule still holds; sometimes reweighting or more data suffices. Only changing (concept drift) truly forces relearning the rule.
A high PSI (Population Stability Index) value means the model's accuracy has dropped.
False. PSI measures input distribution shift, not performance. A robust model with stable can keep performing fine despite large PSI — confirm with actual metrics first.
PSI is symmetric in the two distributions, so swapping expected () and actual () gives the same score.
True. Each term is ; the difference and the log both flip sign when you swap and , so their product — and the sum — is unchanged.
Every PSI term is guaranteed non-negative.
True. and always share the same sign (both positive if , both negative if ), so their product is and the whole sum is .
Retraining more frequently is always safer because the model stays fresher.
False. Each retrain pays a fixed cost ; if drift is slow, you spend heavily to recover negligible accuracy, producing a net loss. Frequency must match drift rate.
"New data is more recent, therefore a model trained on it is better."
False. New data can be corrupted, mislabeled, or seasonal noise; recency alone guarantees nothing. This is why a promotion gate exists.
A challenger that beats the champion by any positive margin should be promoted.
False. You promote only if the margin exceeds the noise band ; smaller gains may be random wiggle, and flip-flopping on noise destabilises production. See Champion-Challenger and A-B testing.
Manually re-running a training notebook counts as a retraining pipeline.
False. A pipeline is automated, versioned, testable, and triggerable with stage-level checkpoints; a hand-cranked notebook is none of these.
If drift is zero (PSI = 0), you never need to retrain.
False. PSI = 0 means inputs are unchanged, but concept drift ( shifting) leaves identical while the labels' meaning changes — invisible to PSI entirely.
Spot the error
"We validated the challenger on the same slice the model trained on — its F1 was 0.97, so promote."
Error: train–serve leakage. Evaluating on seen data inflates the metric and hides real-world rot; use a temporally held-out, unseen slice.
"Our pipeline is: fresh data → train → deploy. Simple and safe."
Error: no promotion gate. A corrupted or seasonal batch produces a worse model that ships straight to users — the #1 MLOps disaster. Insert champion–challenger.
"PSI hit 0.30, so we immediately shipped the retrained model to 100% of traffic."
Two errors: PSI () is only an early-warning trigger to investigate, not proof of a broken model; and going straight to 100% skips canary/shadow safety.
"We saved the model file, so we can always reproduce this result."
Error: no lineage. Without the data snapshot hash + code commit + hyperparameters, you cannot reproduce or debug the model. See Data versioning and lineage.
"We used KL divergence as our drift score because it's symmetric."
Error: KL is asymmetric (). PSI is the symmetrised variant. See KL divergence.
"Accuracy hasn't dropped yet, so there's no drift and nothing to watch."
Error: input drift can precede accuracy loss, especially when labels are delayed. Drift-based triggers exist precisely to catch this before the metric moves.
"We always retrain on only the last 24 hours of data to stay maximally fresh."
Error: discarding historical signal overfits to short-term noise/seasonality. Use a rolling window or a weighted blend of old and new data.
Why questions
Why call it a "pipeline" instead of "a script"?
Because each stage (ingest, validate, train, evaluate, promote) can fail independently and must be observable; the pipeline gives stage-level checkpoints, retries, and lineage so garbage data never reaches training.
Why must data validation come before training, not after?
If you train first, you've already burned compute on garbage and may promote a corrupted model. Validation is a gate that stops the run before harm.
Why does the promotion gate use a margin instead of ">"?
absorbs measurement noise so you don't flip-flop between models on random wiggles, which would destabilise production.
Why is concept drift more dangerous than pure covariate shift?
Under concept drift the labels themselves no longer describe reality, so old training data is actively misleading — no reweighting can save you; you must relabel and retrain.
Why compare benefit against cost before retraining?
Retraining carries real compute and deployment risk; you only gain if the recovered money (recovered accuracy times accumulated staleness loss ) is worth more than that cost. Blind hourly retraining pays repeatedly for near-zero benefit.
Why use a ratio inside PSI instead of just the raw gap ?
The ratio makes surprise proportional: a bin going (doubled) matters as much as , which raw differences would understate. It also gives the sign-matching that keeps every term .
Why prefer drift-based triggers when ground-truth labels are delayed?
You can't measure accuracy without labels, so input-distribution shift is your only early signal that the model may be going stale before you can confirm it.
Why version data and code together rather than just the model file?
A model is a function of both; without the exact data snapshot and code commit you cannot reproduce, audit, or debug why a model went bad.
Edge cases
An actual bin is empty (). What happens to PSI, and what do you do?
, so PSI blows up. In practice you floor each bin at a tiny (e.g. ) so the log stays finite.
An expected bin is empty (). Does PSI also break?
Yes — divides by zero, so the term . Both and are degenerate; floor both fractions at a small (and prefer bins wide enough to avoid empties) before computing.
is perfectly stable but the world's labeling rule changed. Will drift monitoring catch it?
No — PSI/KS on inputs sees nothing because is unchanged. Only performance monitoring on fresh labels (or delayed ground truth) reveals this concept drift.
The challenger exactly ties the champion (margin = 0). Promote?
No. Zero improvement never exceeds a positive ; keep the incumbent champion, since switching adds risk with no measured gain.
Both distributions are identical ( for all bins). What is PSI, and is that expected?
Exactly , because every term vanishes when . That is the required "zero when identical" property of a distance-like score.
A one-time holiday spike triggers your drift alarm. Should you retrain?
Not blindly — investigate first. Seasonal spikes are transient; retraining on them bakes short-term noise into the model. Treat the alarm as a signal to check, not an auto-deploy.
Labels arrive weeks late, so performance-based triggers are useless in real time. What trigger fills the gap?
Drift-based triggers — PSI or the KS test on the inputs — act as a leading indicator, warning you of input shift before the delayed accuracy numbers can confirm degradation.
Your challenger wins on average F1 but does much worse on a critical minority segment. Promote on the average?
No. Aggregate F1 can hide a regression on a slice that matters; gate on segment-level metrics too, or you ship a model that quietly fails the group that counts most.