К основному содержанию
скилл CX Codex

diagnose-run — скилл для Claude Code: диагностика и установка

Скилл diagnose-run для Claude Code разбирает сбои запуска, запросов и результаты бенчмарков Evolving Infra. Он подключается, когда evolving-infra serve завершается с ошибкой или бенчмарк уступает эталону.

Apache-2.0 ★ 173 обновлён 2026-11-16

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add mit-han-lab/EvolvingInfra --skill diagnose-run -a claude-code
Открыть на GitHub

Что делает 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-code

2Вручную: положить файлы

~/.claude/skills/diagnose-run/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/diagnose-run/

По шагам, с командами для каждой платформы: Как установить скилл в 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

Похожие скиллы

Все скиллы по теме «DevOps и инфраструктура» →
alibabacloud-elasticsearch-instance-diagnose aliyun Скилл alibabacloud-elasticsearch-instance-diagnose для анализа здоровья кластера Elasticsearch на Alibaba Cloud. Собирает данные из OpenAPI и REST API, выявляет корневые причины проблем и предлагает пути решения. CX Codex +1 127установок benchmark-vllm-model chalk-ai Скилл benchmark-vllm-model считает стоимость токена и запроса для модели на vLLM: поднимает сервер на GPU, гоняет нагрузку и делит цену железа на замеренную пропускную способность. CX Codex +1 1 900установок magpie-kernel-evaluator amd Скилл magpie-kernel-evaluator гоняет бенчмарки LLM-инференса через Magpie, разбирает трейсы в TraceLens и ведёт от узкого ядра до проверенного варианта. CX Codex +1 1 300установок benchmark-model modular Скилл benchmark-model для Claude Code запускает нагрузочные тесты на работающем max serve и измеряет tokens/sec, TTFT и TPOT. Показывает скорость и задержки модели под нагрузкой. CX Codex +1 1 000установок tao-run-on-kubernetes NVIDIA Corporation Скилл tao-run-on-kubernetes для Claude Code отправляет контейнерные джобы TAO в Kubernetes как обычные Job через kubectl. Запускает обучение и инференс на EKS, GKE, AKS или собственном GPU-кластере. CX Codex +1 1 600установок run-experiment wanshuiyin Скилл run-experiment для Claude Code автоматизирует запуск ML-экспериментов на локальных GPU, удалённых серверах, Vast.ai и Modal. Разворачивает код, проверяет видеопамять и настраивает логирование. CX Codex +1 579установок

Из того же набора7

connect-harness Скилл connect-harness для Claude Code подключает Pi, Claude Code или Codex к запущенному стеку Evolving Infra. Он проверяет вызовы инструментов и запускает пробный запрос через выбранный harness. CX Codex +1 ★ 173звёзд репо add-harness Скилл add-harness для Claude Code добавляет скрипт запуска нового агентского harness в Evolving Infra. Он включается, когда нужно подключить harness, для которого ещё нет скрипта в examples/agents. CX Codex +1 ★ 173звёзд репо run-benchmark Скилл run-benchmark для Claude Code запускает replay-бенчмарк Evolving Infra, оценивает результат и сравнивает его с эталоном. Срабатывает на просьбу воспроизвести результаты статьи или проверить изменение в бенчмарке. CX Codex +1 ★ 173звёзд репо connect-agent Скилл connect-agent для Claude Code подключает код агента к запущенному Evolving Infra. Он добавляет идентификаторы к запросам модели и завершает ветки задач. CX Codex +1 ★ 173звёзд репо check-pr Скилл check-pr для Claude Code сверяет изменения и описание pull request с правилами проекта Evolving Infra. Запускается перед созданием PR, отправкой исправлений после ревью или при проверке чужого PR. CX Codex +1 ★ 173звёзд репо deploy-stack Скилл deploy-stack для Claude Code разворачивает Evolving Infra на одном или нескольких GPU-хостах. Запускается по запросу развернуть, запустить или адаптировать стек под Docker, Slurm с Pyxis либо установку из исходников. CX Codex +1 ★ 173звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой