diagnose-run — скилл для Claude Code: диагностика и установка
Скилл diagnose-run для Claude Code разбирает сбои запуска, запросов и результаты бенчмарков Evolving Infra. Он подключается, когда evolving-infra serve завершается с ошибкой или бенчмарк уступает эталону.
Apache-2.0 ★ 173 обновлён 2026-11-16
npx skills add mit-han-lab/EvolvingInfra --skill diagnose-run -a claude-codeЧто делает diagnose-run
Скилл ищет причину сбоя Evolving Infra по логам и коду компонентов, на которые они указывают. Он разбирает ошибки запуска serve, неудачные запросы и отставание от эталонного результата. Для сравнения медленных запусков скилл сопоставляет замеры на одинаковых временных окнах и проверяет переключения планировщика, настройки replay и этапы обработки.
Сначала он называет причину и подтверждающие строки логов или числа, затем предлагает исправление в затронутом компоненте. Код не меняется до установления причины. Повторный запуск для проверки исправления расходует GPU, поэтому его нужно согласовать с владельцем.
Какие задачи решает
- найти, почему
serveзавершился или не вывелready - определить, на каком этапе запрос или replay завершился ошибкой
- сравнить медленный запуск с эталоном на одинаковом временном окне
- сопоставить строки логов с компонентом, где возник сбой
Примеры запросов агенту
- Разбери, почему
evolving-infra serveзавершился до выводаready. - Найди по логам, где падает replay и почему запрос не возвращает ответ.
- Сравни этот запуск с эталоном и выясни, на каком этапе он медленнее.
Как установить diagnose-run
1Через Skills CLI (Vercel)
npx skills add mit-han-lab/EvolvingInfra --skill diagnose-run -a claude-code2Вручную: положить файлы
~/.claude/skills/diagnose-run/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/diagnose-run/
1Через Skills CLI (Vercel)
npx skills add mit-han-lab/EvolvingInfra --skill diagnose-run -a codex2Вручную: положить файлы
.agents/skills/diagnose-run/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add mit-han-lab/EvolvingInfra --skill diagnose-run -a cursor2Вручную: положить файлы
.cursor/skills/diagnose-run/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install mit-han-lab/EvolvingInfra skills/diagnose-run2Вручную: положить файлы
.github/skills/diagnose-run/SKILL.md1Через Skills CLI (Vercel)
npx skills add mit-han-lab/EvolvingInfra --skill diagnose-run -a gemini-cli2Командой платформы
gemini skills install https://github.com/mit-han-lab/EvolvingInfra --path skills/diagnose-runВручную: положить файлы
.devin/skills/diagnose-run/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о diagnose-run
Как установить diagnose-run в Claude Code?
Выполни npx skills add mit-han-lab/EvolvingInfra --skill diagnose-run -a claude-code. Файл скилла появится по пути ~/.claude/skills/diagnose-run/SKILL.md.
Что делает diagnose-run?
Он находит причины сбоев запуска и запросов Evolving Infra, а также сравнивает медленный запуск с эталоном. Результат включает подтверждающие логи или числа и предлагаемое исправление.
Чем diagnose-run отличается от run-benchmark?
diagnose-run разбирает уже возникший сбой или отставание от эталона. Для запуска или оценки бенчмарка предназначен run-benchmark.
Исходный текст
SKILL.md · Apache-2.0
--- name: diagnose-run description: Find why an Evolving Infra run failed to start, failed a request, or scored below a reference. Use when `evolving-infra serve` exits or never prints ready, a replay or request errors, or a benchmark is slower than expected. Not for running or scoring a benchmark; use `run-benchmark`. --- # Diagnose a run Find the root cause of a run that did not start, failed a request, or scored below a reference, with the log lines or numbers that show it. ## Scope - **Reads**: `repository`: the run's logs and the code of every component they point to. - **Writes**: nothing until the cause is named; then the fix, in the component the cause is in. - **Never changes**: any code, to make a symptom go away before its cause is named. - **Outside the repository**: none. A rerun to confirm a fix uses GPUs: confirm it with the owner first. ## Inputs - The work directory of `evolving-infra serve`, or `runs/<job id>/` of `submit.py`. - What was expected: ready, a reply, or the reference result being compared with. ## Steps Go to the step that matches the symptom. ### 1. It did not start `serve` stops when a process it started exits, and names every one that did: `RuntimeError: engine-w1 exited with -9; see <dir>/logs/engine-w1.log`. Under `submit.py` that line is in `<run>/serve.log`. Find the first error in each named log (engine logs are long: weight loading and graph capture print progress lines): ```bash grep -n -E "Error|Address already in use|Cannot assign" <dir>/logs/<name>.log | grep -v 'File "' | head -5 ``` | Message | Cause | Fix | |---|---|---| | `Loaded weights leave no GPU memory for the KV cache under --mem-fraction-static=X. Raise ... above Y` | the weights fill the worker's GPUs; typical when a config written for one worker per host runs on one host, where each worker gets half the GPUs | the one-node config, or `--mem-fraction-static` above Y, or more GPUs per worker | | `ports already in use on this host: ...` (from `serve`) | another process holds a port the layout needs | stop that process, or change the port in `evolving_infra/launch/layout.py` | | `Address already in use (addr='tcp://<ip>:<port>')`, `OwnerPlane failed to bind` | the port is in another engine's range, or a host service holds it | each engine takes two ports per GPU from its `--disaggregation-bootstrap-port` (in its launch line at the top of the log): if the port is in another engine's range the ranges overlap, else `ss -ltnp \| grep :<port>` names the service; fix in `evolving_infra/launch/layout.py` | | `Cannot assign requested address (addr='tcp://<ip>:...')` | the engine was given another host's address | compare `<ip>` with this host's `host N: <ip>` line in `serve.log`; they differ when a host's rank does not match its place in `--hosts`: let `serve` find the host by name, do not pass a scheduler's node index | | router log: a worker is refused, or `engine must enable ...` | the engine and the router run different presets, or engine code read a raw argument | the same preset on both sides; in engine code `resolution_result` (`evolving_infra/engine/AGENTS.md`) | Nothing exited and no `ready` after 40 minutes: read the tail of each engine log; an engine still loading weights or capturing graphs is slow, not stuck. **Check**: the named cause matches the first error of the log, and the fix makes `serve` print `ready`. ### 2. A request or the replay fails | Message | Cause | Fix | |---|---|---| | replay: `The api_key client option must be set` | the client needs any key | `api_key=EMPTY` | | `score.py`: `no lifecycle events` | the replay never ran | read `bench.log` | For a failing request in a running stack, follow it through the logs in this order: `router` (which P and D it chose), the P's engine log, the D's engine log. **Check**: the logs of router, P and D show where the request failed, and after the fix the request returns a reply. ### 3. Slower than the reference A run can differ from the reference in more than one way: go through items 1 to 5 below for both runs before concluding. `<run>/bench` is the directory with `trie-lifecycle-*.jsonl`; scripts are in `skills/diagnose-run/scripts/` and `skills/run-benchmark/scripts/`. 1. **When the planner switched.** `switch_times.py <planner dir> <run>/bench` for both runs prints the switches on the replay clock. Pick, for each P/D split, a window in which both runs held that split (start 120 s after a switch) and compare `benchmarks/replay/score.py` on it. A gap only over the whole run is a gap in when the planner switched. 2. **Same work.** `request_breakdown.py <run>/bench --skip-s S --window-s W` for both. If `replay_context_modes`, `uncached_tokens_mean` or `output_tokens_mean` differ, the replay settings or the inputs differ. `<run>/bench/replay-settings-0.json` has the resolved settings of the run and, under `differs_from_preset`, each one that is not the paper's. 3. **Which stage.** The same output gives `ttft_s_*` (router, prefill, transfer, decode admission) and `decode_ms_per_token_*` (decode). 4. **Decode.** `engine_batches.py decode <run>/bench --skip-s S --window-s W <logs>` for both, with the logs of the workers that were D in the window: worker `w<i>` logs to `engine-w<i>.log`, workers are numbered in the order of `--hosts`, the first `--prefill-workers` start as P, and `switch_times.py` shows later changes. Check the "window in log time" line it prints against the log's own timestamps. Compare rows with the same running requests: equal `ms/step` with a lower `accept len` means speculative decoding accepts less (the outputs differ: step 2's replay settings, the draft configuration); a higher `ms/step` means the decode step itself is slower (kernels, GPU). 5. **Prefill**, when time to first token differs and decode does not: `engine_batches.py prefill ...` on the P workers gives new tokens per second and queue lengths. 6. **Noise.** Repeat runs of one configuration differ by about 4 % in requests per second. **Check**: each of items 1 to 5 has numbers for both runs on the same window. ## Returns - The root cause, with the log lines or numbers that show it. - The fix, or the decision that is the owner's. - For a slower run: each step's numbers for both runs on the same window, and what differs.
© mit-han-lab · Apache-2.0 · mit-han-lab/EvolvingInfra