Skip to content

Monitors and alert rules people will read

Turn a one-time check into a monitor, measure performance once outcomes arrive, and write alert rules that fire when you need them and stay quiet otherwise.

Applied ~12 min11 steps

You will be able to

  • Set up a monitor and say what each run measures
  • Plan for outcomes that arrive late
  • Write an alert rule, and predict how it behaves when a number is missing
  • Avoid alert storms with thresholds on size, episodes and cooldowns

Read first

01

A check you have to remember isn't monitoring

Read

A monitor runs the same check again and again against a dataset's current version. Each run can:

  • score the rows with the model, and compare predictions with training;
  • compare the features with the training data;
  • measure performance on any rows that have an outcome;
  • check your alert rules.

You point a monitor at an alias or a pinned version. Following champion means the monitor moves on its own when you promote. Each run records which version it used.

02

Your outcomes arrive in 90 days

Predict

Predict first

A model predicts loan default, and you learn the true outcome three months later. What can a monitor tell you this morning?

Nothing until the outcomes arriveInputs and predictions today, performance laterPerformance today, using predicted outcomes
Reveal

Inputs and predictions today, performance later. Drift in features and in prediction_psi are your early warnings. They can't confirm a problem, but they don't have to wait. Performance is measured only on rows that carry the outcome, so it arrives late and describes the model as it was months ago.

03

Set one up

In the app

Open a version's Monitor & serve tab and press the + button (New monitor). Name it, choose the model to watch and the dataset to check ({{dataset}} in the walkthrough), then press Save monitor.

Use Run now for the first run. The calendar button sets a schedule. Schedules run while the app is open, and a missed run catches up once at the next start. Settings → Schedules can also run SQL-scored monitors while the app is closed.

Set Minimum rows too. A tiny batch can't support a drift check, so below that count the run is recorded and drift and accuracy are skipped.

04

A rule is a sentence about the numbers

Read

An alert ruleAlert ruleA condition over a monitor's numbers that opens an alert when it is definitely true; missing numbers never fire it. is a condition checked after each run. The dialog offers these starting points:

max_psi() > 0.25
share_drifted() >= 50%
prediction_psi() > 0.2
metric("roc_auc") < champion.roc_auc - 0.03
roc_auc_30d < model.roc_auc - 0.05
rows() < 100

Combine them with AND, OR and NOT. Names such as model.roc_auc read the version's own scores, and champion.roc_auc reads the champion's. Test tries a rule on the latest run before you save it.

Each run also records env_drift: 0 when the Python or R setup matches the one at registration, 1 for a minor change, 2 for a major one. env_drift >= 2 is a rule worth having.

05

When a number is missing

Predict

Predict first

Your rule is metric("roc_auc") < model.roc_auc - 0.05. Today's batch has no outcomes, so there's no AUC. What does the rule do?

It fires, to be safeIt doesn't fire, and shows as unknownIt raises an error
Reveal

It doesn't fire, and its state is unknown. A rule fires only when its condition is definitely true. The logic has three values: unknown AND false is false, and unknown OR true is true. So a drift clause can still fire a rule while its accuracy clause waits for outcomes.

06

Looking every day has a price

Explore

A monitor looks at your model on a schedule, and every look is another chance for noise to cross a line.

EExplorable · Peeking at an A/A test

If you check an experiment with no effect every day, how often will it look like a winner?

With no real difference and a look every day, how often will this A/A test cross p < α at least once?

0.30
How sure?
28
28

Scrub through one experiment's life.

0.05
Simulating…

Commit your prediction above to see the result

Make your prediction first; the figure appears when you commit.

Make your prediction to see the result.

Here nothing is happening, and each daily look can still declare a change. Raise the number of looks and watch the share of false alarms climb.

For rules, this means thresholds on size work better than a bare p < .05 on each run. Ask for a change big enough to act on, or an average over time, such as roc_auc_30d. The next lesson adds detectors built for repeated looks.

07

Episodes, not storms

Read

A firing rule opens an alert. If it fires again, the same alert grows its count instead of opening a new one. When the condition clears, the alert resolves on its own.

Notify again after sets a cooldown in minutes, and repeats inside it only count. The default is 60. A system notification is optional for each rule, and Severity can be info, warning or critical.

Open alerts appear under the bell button, where you can acknowledge or resolve them.

08

Would anyone act on it?

Reflect

An alert nobody acts on trains people to ignore alerts.

Write one rule for a model you know. Then answer these:

  • Who gets it?
  • What do they check first?
  • What would they do if the check confirms it?

If you can't answer, the rule is probably a chart you'd like to look at. Keep it on the run history, not in anyone's notifications.

09

Check your understanding

Checkpoint

Check yourself

The rule is max_psi() > 0.25 OR metric("roc_auc") < 0.7. The largest PSI is 0.31, and this batch has no outcomes. What happens?

Show the answer

Answer: a

An OR is definitely true once one side is true, whatever the other side turns out to be.

Check yourself

A rule fires on five runs in a row, with a one-day cooldown and hourly runs. What do you get?

Show the answer

Answer: a

Repeats extend the open episode, and the cooldown limits notifications. The history still records every occurrence.

Check yourself

Put one monitor run in order.

  1. 1It compares features and predictions with training, and measures performance on labeled rows
  2. 2It checks the alert rules on the run's numbers
  3. 3The monitor resolves the model through its alias or pinned version
  4. 4It scores the dataset's current version

Show the answer

The order:

  1. The monitor resolves the model through its alias or pinned version
  2. It scores the dataset's current version
  3. It compares features and predictions with training, and measures performance on labeled rows
  4. It checks the alert rules on the run's numbers

Rules run last because they read the numbers that the run produces.

10

Do it on your own data

In the app

Expand your monitor, press New alert rule under Alert rules, and write a condition. Then press Test. The result says Would fire, Would not fire or Unknown (missing data), with the value of each term.

Discover scorers work here too. Registered clusterings and anomaly detectors report how segment shares and the anomaly rate move, so a rule can watch anomaly_rate. See the Discover scorerDiscover scorerA registered Discover run that assigns new rows to its clusters, scores their oddness or places them on its map. entry.

11

Recap

Recap
  • A monitor repeats scoring, drift, performance and rules, against an alias or a pinned version.
  • Inputs and predictions warn you early; performance waits for outcomes.
  • A rule fires only when its condition is definitely true, so missing numbers never fire it.
  • Repeats extend one alert, and a cooldown limits notifications. Give every rule an owner and an action.