Drift and alerts
How mlflow measures data drift (PSI, Cramer's V), thresholds, alerts and notifications.
A model is trained on past data. Over time the data it receives in production can change: customers behave differently, a sensor is replaced, a form gains a new option. This is called data drift, and it often lowers accuracy before anyone notices. mlflow compares the data your deployment receives with a reference and alerts you when a feature has moved too far.
Drift monitoring works for models served by mlflow and, with the same checks and alerts, for models deployed elsewhere.
The Monitor tab
Open a deployment and select the Monitor tab. It has three parts:
- Drift thresholds and Drift alerts: how often checks run, how sensitive they are, and the alerts they open.
- Drift reports: the history of checks, with a feature-by-feature breakdown.
- Scheduled retraining: see Retraining.
For an overview across all deployments, select Deployments in the sidebar and open the Health tab. It shows Monitoring (alert rules and metrics) and Drift monitoring (every report, filterable by severity).
How drift is measured
Every check compares two sets of predictions that were logged for the deployment:
- The reference is the first predictions logged after the current model went live. It is fixed, so a slow, steady shift keeps showing up instead of becoming the new normal. While there are too few logged predictions for this, mlflow uses the model's training data as the reference when it can be loaded.
- The current window is the most recent logged predictions after the reference.
Then each input feature is scored:
- Numeric features use the Population Stability Index (PSI). The reference values are split into ten buckets of equal size, and PSI measures how much the share of values in each bucket has changed. Features with only a few distinct values, such as flags, use the frequency of each value instead.
- Categorical features get two numbers: a PSI on the frequency of each category, and Cramer's V, which measures how strongly the category mix has changed (from 0 to 1).
A common reading of PSI: below 0.1 is stable, 0.1 to 0.2 is a moderate shift, above 0.2 is a significant shift.
The drift score of a check is the average of the feature scores, shown from 0 to 1 and labeled none, mild, moderate or severe.
Features that cannot be monitored
A category needs at least 5% of the reference values to get its own bucket. A feature where no category reaches 5%, such as an ID or a free-text field, is marked not monitored. PSI cannot measure it, so it is left out of the counts, the average and the severity.
Only logged predictions are compared. Every call to the endpoint is logged, including the test card on the Test tab; batch files are not. A feature needs a minimum number of values on both sides before it is scored. With fewer, it is reported as having too few values, and a check that scores no feature records nothing, so you never see "no drift" for something that was not measured.
Thresholds and windows
Under Drift thresholds you control how checks run. Admins can change them; other members can read them.
| Setting | What it does | Default |
|---|---|---|
| Scheduled checks and Frequency | Turns checks on or off and sets how often they run: every hour, every 6 hours, daily or weekly. | Every hour |
| PSI threshold (all features) | A feature whose PSI is above this opens an alert. | 0.2 |
| Per-feature overrides | A different threshold for one feature, for example a stricter one for a key input. | None |
| Min. values per feature | Values each side needs before a feature is scored. | 500 |
| Reference size (predictions) | How many predictions form the fixed reference. | 500 |
| Current window (predictions) | How many recent predictions form the window being compared. | 500 |
| Clean checks to resolve | Consecutive clean checks needed to resolve an alert. | 2 |
The minimum cannot be larger than the reference size or the window, because no feature would ever be scored. The page then shows an error. Keep the minimum at several hundred values: with fewer, random noise alone can push PSI over 0.2 for models with many features and cause false alerts. Select Save thresholds to apply your changes.
Scoring starts only after enough predictions have been logged since the model went live. The panel shows how many were logged so far, and when the last scheduled check ran, failed or recorded nothing. Select Check now to run a check immediately instead of waiting.
Rolling a deployment back to another version restarts the reference, because a different model is now serving. See Deploy and test a model.
Alerts
When a feature reaches or goes above its threshold during a check, mlflow opens a drift alert. The list Drift alerts shows, for each alert:
- its status: Open, Acknowledged or Resolved,
- the features over their threshold and the Max PSI,
- how many times it was seen (Seen once, Seen 3 times) and when it was first and last seen.
One alert is opened per incident. If the drift continues, the same alert is updated instead of creating a new one each hour. Select Acknowledge to tell your team that someone is looking at it. An alert resolves by itself after the set number of consecutive clean checks, in which every feature is well below its threshold (below 80% of it).
Filter the list by status with All statuses, Open, Acknowledged or Resolved.
The drift reports list
Each check that scored at least one feature creates a report. The Drift reports list on the Health tab shows its Severity, Deployment, Date, the number of Drifted features and the Avg PSI. In that list, a feature counts as drifted above a PSI of 0.1. A report is Medium when at least one feature is above 0.25 and High when three or more are. These report labels are an overview; alerts use your threshold, 0.2 by default.
Open a report to see the Feature drift snapshot: each feature with its kind and score. The assistant can explain a report in plain words if you have set up an AI provider; it only advises.
Notifications
When an alert opens, mlflow notifies in two ways:
- Webhooks. Every webhook subscribed to the
drift.alertevent receives it. See Integrations and automation. - Email. The person who created the deployment receives an email if they turned on Drift alert in their account notifications and the server can send email. Email for this is off until each person opts in. See Your account.
The alert records what was sent, for example "Webhooks notified" or "Email not configured".
Alert rules for metrics
Drift is one signal. You can also be told when a deployment gets slow or starts to fail. On Deployments > Health, under Monitoring, select New rule:
- Give the rule a name, such as "p95 latency over 500 ms".
- Choose the Metric: p95 latency, p50 latency, Requests / min, Error rate or Drift score.
- Choose When it is (above, at or above, below, at or below, equal to) and a Threshold.
- Set the Window (seconds).
- Optionally pick one Deployment; by default the rule applies to All deployments.
- Choose a Destination: Slack (a webhook address of a Slack channel), Email (a list of recipients) or Webhook, and add its Destination config as JSON.
Rules are evaluated by the Alert rule check schedule; create one under Settings > Automation if you have not. The list shows each rule as a sentence, whether it is Fired or Off, and when it Last fired. You can switch a rule on or off and delete it.
Live endpoint metrics
The Overview tab of a deployment shows Predictions, Errors, p50 latency and p95 latency, plus Recent predictions. Latency is measured over the last 100 predictions. On the Health tab, Deployment metrics draws a deployment's metrics over the last hour; pick one under Deployment.
Next steps
Learn the theory
Lessons on learning.mlflow.es that explain the ideas behind this page.
Updated 2026-11-22