▶ Sign up free for the video, slides & prompts
The lesson below is open to all. Enter your email once to unlock every video, slide deck, prompt and code example on this device.
Checking…
MLOps: Shipping ML Models · Lesson 12 of 14 · 2 min read · 5 min video
Data drift and retraining
Spot when the world changes under your model, and retrain safely.
📄 Download slides (PDF)· free sign-upEvery model is a snapshot of the world when it was trained. When the world changes, the model slowly goes out of date. Spotting that change, called drift, and retraining safely is the last piece of the MLOps loop.
Kinds of drift
- Data drift: the inputs change. A new IT park opens near Madhurawada and suddenly there are many more listings from that area
- Concept drift: the link between inputs and answer changes. The same flat is worth more because of a new metro line
- Label drift: the mix of answers changes, such as many more fraud cases during a festival sale
Detecting drift
Compare recent inputs with the training data, feature by feature:
Common measures are the KS test for numbers, the PSI (population stability index) and chi-square for categories. Drift doesn't always hurt accuracy, so confirm with real quality metrics when labels arrive.
When to retrain
- On a schedule: weekly or monthly. Simple and predictable
- On a trigger: when drift or accuracy alerts fire
- Both: a regular schedule, plus a trigger for sudden changes
Retraining safely
- Train on fresh data with the same pipeline
- Evaluate on a recent test set, and compare with the current model
- Promote only if it's better, using the evaluation gate
- Roll out gradually (canary or shadow mode), watching the monitors
- Keep the old model ready for rollback
Shadow mode means the new model makes predictions alongside the old one without affecting users, so you can compare them on real traffic first.
In one line
Watch for changes in inputs, outcomes and accuracy, retrain on a schedule or a trigger with the same pipeline, and promote new models only after they prove themselves.
Share with a friend