Nan Origin Trace

Find where a NaN or Inf first appears in a simulation or training run. Restart from the last good checkpoint with floating-point traps on (np.seterr all raise, torch.autograd.set_detect_anomaly, FPE trapping in Fortran and C), add finite checks per stage, bisect steps then layers. Check in order: bad input rows (empty groups, zero variance, a -9999 sentinel read as data), division by a quantity that can reach zero, unstable exp, softmax or log, float16 overflow and missing loss scaling, exploding step size or learning rate. Fix at the origin, keep a finite assertion at the stage boundary, never mask with nan_to_num. Use for "loss became NaN at step 40k", "simulation blows up after a few hours" or "overflow encountered in exp". Not for wrong digits (floating-point-error-hunt), logic bugs (debugging) or restarts (checkpoint-restart-design).

greenblacked Updated
The twenty-nine plugins: coding, family, gamedev, operations, delivery, security, manager, personal, career, design, llm, data, techdocs, assurance, client-apps

File contents

greenblacked/AI commit 3a239acc0e

Frequently asked questions

npx get-skill add greenblacked/nan-origin-trace