Training health and alerts
The thirty checks Kaimei runs on every training run, the findings they make, and the rules and channels that send them to you.
Kaimei checks every run as its batches arrive, and again when it finishes. A check that sees something makes a finding: what it saw, between which steps, the numbers behind it, and advice. A finding stays open until you acknowledge, resolve or mute it, or the check sees it end. The client runs five of the checks itself (non_finite, divergence, loss_spike, exploding_gradients, loss_scale_collapse), so a stop policy works offline; its findings have source: "client". Your own alerts, run.alert(title, text), are findings of the check custom.
Alert rules send findings to notification channels (email, a webhook or Slack). API keys need the runs scope for findings, the alerts scope for rules and channels, and the projects scope for a project's training settings.
#The health checks
Each check fires at its usual severity; a project's settings make it more or less sensitive. metric_alert findings come from alert rules that watch a metric, and custom from run.alert(). prediction_collapse, forgetting, overconfidence and mislabeled_examples also read the run's probe evaluations (the latest 30 of each set); those findings have the layer probe set <name>.
| Check | Severity | Fires when |
|---|---|---|
non_finite | critical | A loss, a metric or the gradient norm is NaN or infinite. |
divergence | critical | The smoothed training loss is far above its lowest and still rising. |
loss_spike | medium | A point far outside the spread of the points before it; high when the loss does not come back down. |
overfitting | high | Validation loss is rising while training loss falls. |
generalization_gap | medium | The gap between validation and training loss widens evaluation after evaluation. |
not_learning | high | The loss has hardly moved, or a metric sits at chance. |
plateau | low | The loss stopped improving for several evaluations. |
oscillation | medium | The loss zigzags from step to step. |
lr_too_low | low | The updates are tiny next to the weights: the learning rate looks too low. |
exploding_gradients | high | The gradient norm is far above its usual level. |
vanishing_gradients | medium | Gradients vanish in the early layers. |
clipping_saturated | medium | Gradient clipping is active on most steps. |
update_ratio_band | medium | A layer's update ratio (the step's size over the weights') is far outside the usual band. |
frozen_parameters | medium | Some parameters are not training. |
dead_units | medium | Units that output zero for nearly every input. |
saturated_activations | medium | tanh or sigmoid units stuck at their limits. |
weight_norm_runaway | low | A layer's weights keep growing. |
attention_collapse | medium | Attention heads that look at one position only. |
prediction_collapse | high | The model gives nearly every input the same answer. |
overconfidence | low | The model is growing overconfident: validation loss, or the true class's loss on a probe set, rises while accuracy holds. |
possible_leakage | medium | Validation loss far below training loss, or validation scores near perfect. |
mislabeled_examples | low | Probe examples never learned, with another class given a high probability. |
forgetting | medium | Probe examples are learned and then forgotten. |
loss_scale_collapse | high | Mixed precision's loss scale is at its floor, or many steps are skipped for overflow. |
dataloader_bottleneck | low | Training waits for data. |
memory_pressure | medium | GPU memory is nearly full. |
throughput_drop | low | Training slowed down, or one rank is a straggler. |
edge_of_stability | info | Sharpness has reached 2 / learning rate. Often normal: it explains an oscillation. |
stalled_run | high | The run stopped reporting, or reports without making progress. |
best_stop | info | The best validation result is behind the run, at the step it names. |
#The finding object
evidence holds the series and numbers the check read; the dashboard draws them.
Attributes
fnd_ identifier.The check: one of the thirty, custom or metric_alert.
critical, high, medium, low or info.open, acknowledged, resolved or muted.The layer it is about, for per-layer checks; for metric_alert, the condition, such as val/loss > 1.
The steps it covers.
What was seen, in a sentence and a paragraph, and what to try.
The series and values behind it.
server or client.Yours, up to 4,000 characters.
{
"object": "finding",
"id": "fnd_8057422bb9588d65c631",
"run_id": "run_3f2a19c0d1e2f3a4b5c6",
"detector": "custom",
"severity": "high",
"state": "open",
"layer": null,
"step_lo": 1200,
"step_hi": 1200,
"title": "Validation AUC below 0.7",
"summary": "val/auc is 0.66 at step 1200.",
"evidence": {},
"advice": null,
"source": "client",
"note": null,
"created_at": "2026-12-05T12:01:00.249239+00:00",
"updated_at": "2026-12-05T12:01:00.249239+00:00",
"resolved_at": null
}#List a run's findings
/v1/runs/{run_id}/findingsAPI key or sessionOpen findings first, then by severity, newest first.
Path parameters
The run's id: run_ and 8 to 64 lowercase letters or digits.
Query parameters
Comma separated: open, acknowledged, resolved or muted.
Comma separated: critical, high, medium, low or info.
1 to 1,000.
Findings to skip.
Returns
for finding in client.runs.findings("run_3f2a19c0d1e2f3a4b5c6", state="open").data:
print(finding.severity, finding.title)curl https://api.kaimei.ai/v1/runs/run_3f2a19c0d1e2f3a4b5c6/findings?state=open \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "list",
"data": [
{
"object": "finding",
"id": "fnd_8057422bb9588d65c631",
"run_id": "run_3f2a19c0d1e2f3a4b5c6",
"detector": "custom",
"severity": "high",
"state": "open",
"layer": null,
"step_lo": 1200,
"step_hi": 1200,
"title": "Validation AUC below 0.7",
"summary": "val/auc is 0.66 at step 1200.",
"evidence": {},
"advice": null,
"source": "client",
"note": null,
"created_at": "2026-12-05T12:01:00.249239+00:00",
"updated_at": "2026-12-05T12:01:00.249239+00:00",
"resolved_at": null
}
],
"total": 1,
"limit": 100,
"offset": 0,
"has_more": false,
"next_cursor": null
}#Update a finding
/v1/runs/{run_id}/findings/{finding_id}API key or sessionAcknowledge, resolve, mute or annotate a finding. Muting it mutes its check (and layer) for the run; setting it open again undoes that. When one check is muted in three runs of a project, its sensitivity there drops a level.
Path parameters
The run's id: run_ and 8 to 64 lowercase letters or digits.
fnd_ identifier.Body parameters
open, acknowledged, resolved or muted.Up to 4,000 characters, kept on the finding.
Returns
curl -X PATCH https://api.kaimei.ai/v1/runs/run_3f2a19c0d1e2f3a4b5c6/findings/fnd_8057422bb9588d65c631 \
-H "Authorization: Bearer $KAIMEI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"state": "acknowledged", "note": "Known: the holdout set is small."}'{
"object": "finding",
"id": "fnd_8057422bb9588d65c631",
"run_id": "run_3f2a19c0d1e2f3a4b5c6",
"detector": "custom",
"severity": "high",
"state": "acknowledged",
"layer": null,
"step_lo": 1200,
"step_hi": 1200,
"title": "Validation AUC below 0.7",
"summary": "val/auc is 0.66 at step 1200.",
"evidence": {},
"advice": null,
"source": "client",
"note": "Known: the holdout set is small.",
"created_at": "2026-12-05T12:01:00.249239+00:00",
"updated_at": "2026-12-05T12:01:00.547797+00:00",
"resolved_at": null
}#List findings across runs
/v1/run-findingsAPI key or sessionFindings of every run in the workspace, newest first, each with its run's id, name and status.
Query parameters
A project's slug, id or name.
A model's slug or id.
A run's id.
Comma separated: open, acknowledged, resolved or muted.
Comma separated.
Comma-separated checks.
1 to 200.
Findings to skip.
The next_cursor of the page before: pages without offsets.
Returns
run.curl https://api.kaimei.ai/v1/run-findings?state=acknowledged \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "list",
"data": [
{
"object": "finding",
"id": "fnd_8057422bb9588d65c631",
"run_id": "run_3f2a19c0d1e2f3a4b5c6",
"detector": "custom",
"severity": "high",
"state": "acknowledged",
"layer": null,
"step_lo": 1200,
"step_hi": 1200,
"title": "Validation AUC below 0.7",
"summary": "val/auc is 0.66 at step 1200.",
"evidence": {},
"advice": null,
"source": "client",
"note": "Known: the holdout set is small.",
"created_at": "2026-12-05T12:01:00.249239+00:00",
"updated_at": "2026-12-05T12:01:00.547797+00:00",
"resolved_at": null,
"run": {
"id": "run_3f2a19c0d1e2f3a4b5c6",
"name": "bright-falcon-12",
"status": "running"
}
}
],
"total": 1,
"limit": 50,
"offset": 0,
"has_more": false,
"next_cursor": null
}#Read a project's training settings
/v1/projects/{project}/training-settingsAPI key or sessionHow sensitive the checks are for the project's runs, and the mutes that lower them.
Path parameters
Project slug, id or name.
Returns
project, sensitivity (low, normal or high), detectors (the checks set apart from it), mutes (by check, the runs that muted it), mutes_to_lower and updated_at.curl https://api.kaimei.ai/v1/projects/credit-risk/training-settings \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "training_settings",
"project": {
"id": "prj_d28a961cfec4c14af1e9",
"slug": "credit-risk",
"name": "credit-risk"
},
"sensitivity": "normal",
"detectors": {},
"mutes": {},
"mutes_to_lower": 3,
"updated_at": null
}#Set a project's training settings
/v1/projects/{project}/training-settingsAPI key or sessionChange how sensitive the checks are. Only the fields sent change. Low sensitivity fires least.
Path parameters
Project slug, id or name.
Body parameters
low, normal or high, for every check.By check, a level of its own, or null to follow the project's again. An unknown check is 400 invalid_detector.
Returns
curl -X PUT https://api.kaimei.ai/v1/projects/credit-risk/training-settings \
-H "Authorization: Bearer $KAIMEI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sensitivity": "high", "detectors": {"plateau": "low"}}'{
"object": "training_settings",
"project": {
"id": "prj_d28a961cfec4c14af1e9",
"slug": "credit-risk",
"name": "credit-risk"
},
"sensitivity": "high",
"detectors": {"plateau": "low"},
"mutes": {},
"mutes_to_lower": 3,
"updated_at": "2026-12-05T12:01:00.569052+00:00"
}#The alert rule object
A rule sends the findings it matches to its channels: findings of its detectors at min_severity or above, and, with a metric, a metric_alert finding when that condition holds on a run.
Attributes
alr_ identifier.The project whose runs it covers, or null for every run of the workspace.
Checks, custom, or * for all of them, custom included.
critical, high, medium, low or info.{key, op, value}, op one of >, >=, <, <=, ==, !=: checked on each run's latest value of the series. Its finding resolves when the condition stops holding.nch_ ids.At most one message per check per run in this many minutes.
A matching finding also asks the run to stop, once (an auto_stop event and an audit entry).
When messages go. A finding is sent when it is new, opens again, or its severity rises. Low and info findings sent by email or to Slack wait for a daily digest, one message a destination once the oldest has waited a day; webhooks get every finding as it comes. With no rule covering a run, critical and high findings are emailed to the person who started it (to the workspace's owners for a workspace key), at most once per check per run in 30 minutes. Failed sends are retried.
{
"object": "alert_rule",
"id": "alr_e918366ec59f763cb3de",
"name": "Divergence and NaNs",
"project": {
"id": "prj_d28a961cfec4c14af1e9",
"slug": "credit-risk",
"name": "credit-risk"
},
"detectors": ["non_finite", "divergence"],
"min_severity": "high",
"metric": null,
"channels": ["nch_ea0cb649a8acf51ee7cd"],
"cooldown_minutes": 30,
"enabled": true,
"stop_run": true,
"created_at": "2026-12-05T12:01:00.602590+00:00",
"updated_at": "2026-12-05T12:01:00.602590+00:00"
}#List alert rules
/v1/alert-rulesAPI key or sessionEvery rule of the workspace.
Returns
curl https://api.kaimei.ai/v1/alert-rules \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "list",
"data": [
{
"object": "alert_rule",
"id": "alr_e918366ec59f763cb3de",
"name": "Divergence and NaNs",
"project": {
"id": "prj_d28a961cfec4c14af1e9",
"slug": "credit-risk",
"name": "credit-risk"
},
"detectors": ["non_finite", "divergence"],
"min_severity": "high",
"metric": null,
"channels": ["nch_ea0cb649a8acf51ee7cd"],
"cooldown_minutes": 30,
"enabled": true,
"stop_run": true,
"created_at": "2026-12-05T12:01:00.602590+00:00",
"updated_at": "2026-12-05T12:01:00.602590+00:00"
}
],
"has_more": false
}#Create an alert rule
/v1/alert-rulesAPI key or sessionSend matching findings to channels, and optionally stop the run. A rule watches findings, a metric, or both (400 invalid_rule otherwise).
Body parameters
1 to 120 characters.
A project's slug, id or name. Left out: every run of the workspace.
Checks, custom or *. Left out: ["*"], or none when the rule watches a metric. An unknown check is 400 invalid_detector.
critical, high, medium, low or info.{key, op, value}, value a finite number (400 invalid_metric otherwise).Channel ids of this workspace (404 channel_not_found otherwise).
0 to 10,080.
Also ask a run with a matching finding to stop.
Returns
201.curl -X POST https://api.kaimei.ai/v1/alert-rules \
-H "Authorization: Bearer $KAIMEI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Divergence and NaNs", "project": "credit-risk", "detectors": ["non_finite", "divergence"],
"channels": ["nch_ea0cb649a8acf51ee7cd"], "stop_run": true}'{
"object": "alert_rule",
"id": "alr_e918366ec59f763cb3de",
"name": "Divergence and NaNs",
"project": {
"id": "prj_d28a961cfec4c14af1e9",
"slug": "credit-risk",
"name": "credit-risk"
},
"detectors": ["non_finite", "divergence"],
"min_severity": "high",
"metric": null,
"channels": ["nch_ea0cb649a8acf51ee7cd"],
"cooldown_minutes": 30,
"enabled": true,
"stop_run": true,
"created_at": "2026-12-05T12:01:00.602590+00:00",
"updated_at": "2026-12-05T12:01:00.602590+00:00"
}{
"object": "alert_rule",
"id": "alr_a10a255a2a22da38b4d1",
"name": "val/loss above 1",
"project": null,
"detectors": [],
"min_severity": "high",
"metric": {"key": "val/loss", "op": ">", "value": 1.0},
"channels": ["nch_ea0cb649a8acf51ee7cd"],
"cooldown_minutes": 30,
"enabled": true,
"stop_run": false,
"created_at": "2026-12-05T12:01:00.636964+00:00",
"updated_at": "2026-12-05T12:01:00.636964+00:00"
}#Retrieve an alert rule
/v1/alert-rules/{rule_id}API key or sessionOne rule (404 alert_rule_not_found otherwise).
Path parameters
alr_ identifier.Returns
curl https://api.kaimei.ai/v1/alert-rules/alr_e918366ec59f763cb3de \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "alert_rule",
"id": "alr_e918366ec59f763cb3de",
"name": "Divergence and NaNs",
"project": {
"id": "prj_d28a961cfec4c14af1e9",
"slug": "credit-risk",
"name": "credit-risk"
},
"detectors": ["non_finite", "divergence"],
"min_severity": "high",
"metric": null,
"channels": ["nch_ea0cb649a8acf51ee7cd"],
"cooldown_minutes": 30,
"enabled": true,
"stop_run": true,
"created_at": "2026-12-05T12:01:00.602590+00:00",
"updated_at": "2026-12-05T12:01:00.602590+00:00"
}#Update an alert rule
/v1/alert-rules/{rule_id}API key or sessionOnly the fields sent change. project and metric take null to clear them.
Path parameters
alr_ identifier.Body parameters
As when creating a rule.
Returns
curl -X PATCH https://api.kaimei.ai/v1/alert-rules/alr_e918366ec59f763cb3de \
-H "Authorization: Bearer $KAIMEI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cooldown_minutes": 60}'{
"object": "alert_rule",
"id": "alr_e918366ec59f763cb3de",
"name": "Divergence and NaNs",
"project": {
"id": "prj_d28a961cfec4c14af1e9",
"slug": "credit-risk",
"name": "credit-risk"
},
"detectors": ["non_finite", "divergence"],
"min_severity": "high",
"metric": null,
"channels": ["nch_ea0cb649a8acf51ee7cd"],
"cooldown_minutes": 60,
"enabled": true,
"stop_run": true,
"created_at": "2026-12-05T12:01:00.602590+00:00",
"updated_at": "2026-12-05T12:01:00.627959+00:00"
}#Delete an alert rule
/v1/alert-rules/{rule_id}API key or sessionStop sending what the rule matched.
Path parameters
alr_ identifier.Returns
curl -X DELETE https://api.kaimei.ai/v1/alert-rules/alr_a10a255a2a22da38b4d1 \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"id": "alr_a10a255a2a22da38b4d1",
"object": "alert_rule",
"deleted": true
}#The notification channel object
Where alert rules send findings. The target is stored sealed and shown masked.
Attributes
nch_ identifier.email, webhook or slack.The address or URL, masked.
When a test message last got through.
A webhook's signing secret, whsec_…, in the response that creates it and never again.
Webhooks. Kaimei POSTs {"type": "finding", "finding": {…}, "run": {"id", "name", "url"}, "workspace": {"slug"}} with X-Kaimei-Signature: t=<unix time>,v1=<hex>, the HMAC-SHA256 of <t>.<body> under the secret. Check it, and that t is recent, before trusting the body. Slack channels get a message with blocks. Private, loopback and cloud metadata addresses are refused when sending.
{
"object": "notification_channel",
"id": "nch_ea0cb649a8acf51ee7cd",
"kind": "email",
"name": "Ada",
"target": "a•••@example.com",
"verified_at": null,
"created_at": "2026-12-05T12:01:00.575644+00:00"
}#List notification channels
/v1/notification-channelsAPI key or sessionEvery channel of the workspace, targets masked.
Returns
curl https://api.kaimei.ai/v1/notification-channels \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "list",
"data": [
{
"object": "notification_channel",
"id": "nch_ea0cb649a8acf51ee7cd",
"kind": "email",
"name": "Ada",
"target": "a•••@example.com",
"verified_at": null,
"created_at": "2026-12-05T12:01:00.575644+00:00"
}
],
"has_more": false
}#Create a notification channel
/v1/notification-channelsAPI key or sessionAn email address, a webhook or a Slack incoming webhook. An email target must be the address of a member of the workspace (400 email_not_member); webhook and Slack targets are public https URLs (400 invalid_target). The plan sets how many channels a workspace has (403 quota_exceeded, param: notification_channels).
Body parameters
email, webhook or slack.The address or URL.
Up to 120 characters. Left out: made from the target.
Returns
secret for a webhook. 201.curl -X POST https://api.kaimei.ai/v1/notification-channels \
-H "Authorization: Bearer $KAIMEI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind": "webhook", "name": "Training alerts", "target": "https://hooks.example.com/kaimei"}'{
"object": "notification_channel",
"id": "nch_5c1f7e09d2a84b3e6f10",
"kind": "webhook",
"name": "Training alerts",
"target": "https://hooks.example.com/•••",
"verified_at": null,
"created_at": "2026-12-05T12:01:00.575644+00:00",
"secret": "whsec_EXAMPLEnotARealSecret0000000000000000000000"
}#Retrieve a notification channel
/v1/notification-channels/{channel_id}API key or sessionOne channel (404 channel_not_found otherwise).
Path parameters
nch_ identifier.Returns
curl https://api.kaimei.ai/v1/notification-channels/nch_ea0cb649a8acf51ee7cd \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "notification_channel",
"id": "nch_ea0cb649a8acf51ee7cd",
"kind": "email",
"name": "Ada",
"target": "a•••@example.com",
"verified_at": null,
"created_at": "2026-12-05T12:01:00.575644+00:00"
}#Delete a notification channel
/v1/notification-channels/{channel_id}API key or sessionDelete the channel. Rules that sent to it stop sending there.
Path parameters
nch_ identifier.Returns
curl -X DELETE https://api.kaimei.ai/v1/notification-channels/nch_ea0cb649a8acf51ee7cd \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"id": "nch_ea0cb649a8acf51ee7cd",
"object": "notification_channel",
"deleted": true
}#Test a notification channel
/v1/notification-channels/{channel_id}/testAPI key or sessionSend a test message now. A webhook gets {"type": "test", "channel": {"id", "name"}, "workspace": {"slug"}}, signed like every webhook, and has 12 seconds to answer; Slack a short text; email a short message. A channel that answers is marked verified.
A workspace tests two channels at a time, and 30 an hour on the Free plan (90 on Standard, 300 on Team, 900 on Enterprise); past either, 429 rate_limited with Retry-After.
Path parameters
nch_ identifier.Returns
ok, the HTTP status the target answered (null for email) and error.curl -X POST https://api.kaimei.ai/v1/notification-channels/nch_ea0cb649a8acf51ee7cd/test \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"ok": true,
"status": null,
"error": null
}