debug

Featured

Evidence-before-action diagnosis of failing ML experiments. Probes the system before guessing causes, process list, dmesg, GPU stats, log scrollback, checkpoint state, then states a hypothesis as a hypothesis and runs a smoke before claiming a root cause. Use when the user asks why a run is failing, diverging, OOMing, hanging, slow, producing weird metrics, has crashed, or asks to debug, diagnose, troubleshoot, or investigate a training issue.

Code & Development 408 stars 34 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
87
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Debug: evidence-before-action investigation The most expensive class of mistake in ML debugging is asserting a cause based on plausibility, then attempting a "fix" that masks the real problem. This skill enforces the discipline of probe → hypothesis → smoke → controls → claim, in that order. The agentic Stop hook routes here from `reason` when an assistant claims a cause without backing tool output. ## When to run The user just said any of: - "why is X failing / diverging / NaN / OOM / hung / slow / crashed" - "the loss is going up", "metrics look weird", "GPU util is 0" - "debug this", "diagnose", "troubleshoot", "investigate this run" - pasted a log excerpt asking what's wrong ## Five-step protocol ### Step 1: cheap probes Before forming any hypothesis, gather the cheap evidence. None of these cost more than a few seconds: **Process state:** ```bash ps aux | grep -E '(python|train|torchrun|accelerate)' | grep -v grep ``` Is the process still running? Zombie? Defunct? Multiple instances? **Kernel / system events:** ```bash dmesg | tail -100 # OOM kills, hardware errors, NFS errors journalctl -xe --since "1 hour ago" | tail -50 ``` **GPU state:** ```bash nvidia-smi nvidia-smi --query-gpu=utilization.gpu,memory.used,temperature.gpu --format=csv ``` Is the GPU even being used? Idle GPU during "training" means the process is blocked on data loading or has died. **Disk / filesystem:** ```bash df -h /path/to/run-dir du -sh /path/to/run-dir/* ``` Out of disk? C...

Details

Author
fcakyon
Repository
fcakyon/phd-skills
Created
6 months ago
Last Updated
1 weeks ago
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

debug

Evidence-before-action diagnosis of failing ML experiments. Probes the system before guessing causes, process list, dmesg, GPU stats, log scrollback, checkpoint state, then states a hypothesis as a hypothesis and runs a smoke before claiming a root cause. Use when the user asks why a run is failing, diverging, OOMing, hanging, slow, producing weird metrics, has crashed, or asks to debug, diagnose, troubleshoot, or investigate a training issue.

2 Updated 1 months ago
wookat
AI & Automation Listed

debug

Use when existing behavior is reported wrong (bug, error, crash, regression, broken output, slowdown) and no evidence yet shows one causal line plus a mechanism predicting the symptom. Not when a diagnostic's file, line and symbol match the source, when the stated cause checks out, or for a feature complaint.

1 Updated today
blauwtje
AI & Automation Listed

diagnose

Find WHY something behaves as it does by running competing explanations against each other — evidence for and against each, a rebuttal round, then the one probe that would settle what is left, executed if it can be. Use when a test fails for reasons that are not obvious, when a measurement or benchmark result needs explaining, when two explanations both fit the facts, or on 'warum passiert das', 'wieso ist die Zahl anders', 'was ist da los', 'trace this'. When you can already reproduce and localise the failure, the `debugger` agent is enough. It ends at the decisive probe — applying the fix is `implement`.

0 Updated yesterday
juliuswiener