ml-debugging
Installation
SKILL.md
ML Debugging
Overview
ML bugs are usually silent — the code runs, but the model is wrong. Debug systematically by isolating which layer is broken: data, optimization, or generalization. Form a hypothesis, test it with the cheapest possible experiment, then move on.
When to use
- Loss is NaN/Inf or stuck.
- Metrics are implausibly high (leakage) or stuck at chance.
- Train/val curves diverge.
First move: can it overfit one batch?
The fastest sanity check in ML. Take a single small batch and train until loss ≈ 0.