← All questions
LLMOps & ProductionVery Hard· Automation· Reliability· System Design

Design an automated spike detection and rollback system...

Automate Tier 1 actions such as skipping batches when loss_ema_ratio exceeds 2.0 and halting immediately if nan_frac is greater than zero. For Tier 2 events, page the on-call engineer with a diagnostic summary including log_Z trends, gradient norm history, and data shard identifiers. Avoid fully automated Tier 2 rollbacks because they are risky; a human must decide if the rollback destination is safe or if a configuration change is required to prevent the spike from recurring.

Code playground (Python)