Module 6 · step 3 of 4 · Monitoring and drift
Alerts and guarded retraining
How drift alerts and guarded retraining work in a full account, and what the demo lets you see.
App7 min
In this step you find where mlflow raises drift alerts and where it retrains a deployed model on a schedule. It matters because noticing drift only helps if someone is told, and because automatic retraining without guardrails can replace a good model with a worse one. Most of this is blocked in the demo, so you first look at what you can see, then read what a full account does.
The idea
Alerts and retraining are two tools joined by your judgement. An alert is a message: a feature went over its PSI threshold. mlflow opens one alert per incident and updates it while the drift continues, instead of sending a new message at every check. Guarded retraining is an action: train again on the newest data, compare with the deployed model and promote only if the new one wins by a margin you set. The margin matters because two trainings of the same recipe differ a little by chance.
Step by step
- Open your deployment and select the Monitor tab.
- Find Drift alerts and its status filter: All statuses, Open, Acknowledged, Resolved. The list says "No drift alerts" because no check has opened one yet.
- Find the Scheduled retraining card. Read Retrain on a schedule, Frequency, Primary metric, Margin type and Required improvement, even though the demo blocks saving them. The Decision log sits below.
- Select Deployments > Health and look at Monitoring. New rule lets a full account alert on p95 latency, Error rate, Drift score and more, with Slack, Email or Webhook as destination. It is blocked in the demo.
In a full account
Each scheduled drift check compares the current window with the reference. When a feature reaches its PSI threshold, an alert opens (showing Max PSI and the features over the limit) and notifies the workspace webhooks through the drift.alert event and, if configured, by email. Select Acknowledge to tell the team someone is on it. The alert resolves by itself after the set number of consecutive clean checks (Clean checks to resolve, 2 by default).
For retraining, an admin switches on Retrain on a schedule, picks Frequency, Primary metric, Margin type (Absolute (metric units) or Relative (% of current)) and Required improvement, then selects Save schedule. Run now starts one immediately, for example after an alert opens. At each run mlflow retrains the deployed model's pipeline on the latest version of its dataset and compares the result. Every outcome (Promoted, Kept current, Failed, Skipped) goes to the Decision log with its reason and a View run link. A promotion creates a new pipeline version, so the previous one stays under Versions and Rollback to v is always available. Deployments served outside mlflow cannot be promoted this way.
Retraining on unchanged data can replace a good model because of random noise. The margin prevents that: the candidate must be strictly better, and by at least the margin you set. Error metrics such as RMSE count lower as better.
Common mistakes
- Setting a margin smaller than the normal run-to-run variation of your metric. If you do not know it, start with a relative margin of 1% to 2%.
- Expecting Run now to work at once. It stays disabled with "Save an enabled schedule without problems first" until the schedule is valid.
- Reading Kept current as a failure. It means the candidate did not clear the margin; the reason line shows both scores.
- Leaving an alert Open for days. Acknowledge it so the team knows it has an owner.
As a data scientist
Alert on what you will act on: one drift alert per incident and a few latency or error rules, not dozens. Choose the primary metric and the margin before the first retrain, from what the business cares about, and read the Decision log like a lab notebook: each line is evidence of how often retraining really helps.
Checkpoint
You should see Drift alerts with its status filter and the Scheduled retraining card on the Monitor tab, and be able to describe, in your own words, what Required improvement and the Decision log do.