Denpex
v0.2.47Diagnose GPU and ML training failures (CUDA OOM, NCCL timeouts, Xid faults) locally or via cloud.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
diagnose_crash Diagnose a GPU/ML crash
Diagnose a GPU/ML training crash (CUDA OOM, NCCL timeout, Xid fault, NaN loss, checkpoint corruption, etc.) and get the root cause plus an escalating fix (primary → fallback → emergency). Provide ONE of: `logs` (paste), `file` (path to a log), or `dir` (folder to scan for the newest *.err/*.log). Runs the canonical deterministic engine locally by default (unlimited free local runs), and escalates to the Denpex cloud when DENPEX_API_KEY is configured or cloud: true is passed. Or run fully offline with DENPEX_LOCAL=1.
| Parameter | Type | Description |
|---|---|---|
cloud | boolean | Set to true to explicitly request a Cloud Deep Reasoning review when running without an API key. |
codeContext | object | Relevant source files as { path: contents }. Only send real files you read, the engine never fabricates code context, and neither should you. |
dir | string | Directory to scan for the newest *.err / *.log / *.out / *.txt. |
file | string | Path to a log file to read from disk. |
gpuRate | number | Your effective $/GPU-hour (enables a $ cost estimate). |
jobName | string | Optional job or run name (saved to history). |
logs | string | Paste the crash log or stderr. Terse machine events such as Xid 79 are accepted. |
operatorAnswers | array | Answers from a previous diagnose_crash result. Send the full answer history with the same original logs. Selecting an ACTION asks Denpex for that evidence; it is not treated as the result of the check… |
refinementToken | string | Anonymous-only capability returned by the prior diagnosis. Normally cached automatically in this MCP process; pass it explicitly after a process restart. |
runtimeHours | number | Hours the job ran before crashing (enables a $ cost estimate). |
telemetry | object | Hardware telemetry captured from the failing node. Keys the engine reads: `dmesg` (output of `dmesg -T`), `nvidia_smi` (`nvidia-smi -q`), `ibstat`. Sending these turns an ambiguous NCCL timeout into a… |
topologyMap | object | Rank → node placement as { nodeName: [rank...] }, e.g. from the launcher. Lets the engine map a failing rank to a physical node and GPU. |
deep_research_crash Deep Research a GPU/ML crash
Run multi-round web and Obscura headless page research on a GPU/ML crash to cross-check GitHub issues, release fixes, vendor advisories, and engineering write-ups with cited sources. Disabled when DENPEX_LOCAL=1.
| Parameter | Type | Description |
|---|---|---|
dir | string | Directory to scan for the newest *.err / *.log / *.out / *.txt. |
environment | string | Optional cluster/library environment versions (PyTorch, CUDA, NCCL, driver). |
failureType | string | Optional known failure class, e.g. NCCL_TIMEOUT. |
file | string | Path to a log file to read from disk. |
logs | string | Paste the crash log or stderr (min 20 characters). |
inspect_gpu_artifact Inspect a GPU artifact locally
Read-only local inspection of PyTorch Flight Recorder JSON rank dumps, CUDA memory snapshot JSON, Nsight SQLite, checkpoint candidates or aligned rank timing JSON. Requires Python 3; uses no network and never executes pickle or changes checkpoints. Pass the resulting JSON to diagnose_crash as logs to review or save it using your normal Denpex configuration.
| Parameter | Type | Description |
|---|---|---|
module * | string | |
path * | string | Local artifact file or checkpoint root directory. |
lookup_failure Look up a known GPU/ML failure
Search Denpex's bundled 721-class failure encyclopedia by error code, keyword, or symptom (e.g. 'Xid 79', 'NCCL timeout', 'loss is NaN', 'CUDA out of memory'). Returns the most relevant known failures with their fixes. Works fully offline and costs no quota. Use `diagnose_crash` instead when you have a full crash log.
| Parameter | Type | Description |
|---|---|---|
query * | string | Error code, message, or symptom to look up. |
limit | integer | Max results (default 5). |
analyze_cascade Find the culprit rank in a distributed hang
Analyze a multi-rank distributed-training failure: find the rank that failed FIRST (the others usually just time out waiting on it) and route any GPU Xid faults to the correct node action (reset / reboot / RMA). Runs offline and instantly, provide the gathered per-rank logs via `logs`, `file`, or `dir`.
| Parameter | Type | Description |
|---|---|---|
dir | string | Directory to scan for the newest log file. |
file | string | Path to a log file to read. |
logs | string | Paste the combined per-rank logs. |
check_quota Check Denpex plan & quota
Show your Denpex plan, allowance tier, and diagnoses left today.
ask_followup Ask a follow-up about a diagnosis
Ask the Denpex diagnostician a follow-up question about a crash, clarify the fix, explore an alternative, or dig deeper. Pass the original `logs` and your `question`; pass back the `conversationId` from a previous reply to continue the thread. Requires the Team plan or an active trial.
| Parameter | Type | Description |
|---|---|---|
logs * | string | The original crash logs the question is about. |
question * | string | Your follow-up question. |
conversationId | string | From a previous reply, to continue the same thread. |
history | array | Prior turns of this conversation, oldest first. |
check_versions Check for known-bad library/version combos
Scan logs (or an environment dump like `pip list` / `nvidia-smi`) for CUDA / PyTorch / cuDNN / NCCL / driver versions that are known to be incompatible or buggy together, and get the recommended pin. Requires the Team plan or an active trial.
| Parameter | Type | Description |
|---|---|---|
dir | string | Directory to scan for the newest log file. |
file | string | Path to a log / environment file. |
logs | string | Paste logs or an environment dump. |
list_incidents List proactive fleet incidents
List the GPU/training incidents Denpex's always-on monitor caught and auto-escalated on your fleet, failure type, cluster, escalation level, and the fix it applied. Requires the Scale plan or higher.
recent_diagnoses List recent diagnoses
Show your most recent Denpex diagnoses, job name, failure type, confidence, and the fix, so you can recall what a prior crash was and how it was resolved.
| Parameter | Type | Description |
|---|---|---|
limit | integer | How many to return (default 10). |
submit_fix_outcome Report whether a Denpex fix worked
Report back whether a Denpex fix actually resolved the failure. Call this after you apply a fix from `diagnose_crash` and observe the result, it is the ONLY way the engine learns, and it directly improves the next diagnosis of this failure class for you and everyone else. Pass the `diagnosisId` printed at the bottom of the diagnosis. If the fix did not work, say what actually happened in `note` (and `newFix` if you found the real one), a specific negative is worth more than a vague positive.
| Parameter | Type | Description |
|---|---|---|
diagnosisId * | string | The `diagnosisId` from the diagnosis you acted on. |
outcome * | string | `worked` = the failure is resolved and the job is progressing. `did_not_work` = it recurred or the fix did not apply. |
newFix | string | If you found the real fix, what was it? |
note | string | What actually happened. On a `did_not_work`, this is the most valuable field in the call, say what the log showed after the fix. |
fleet_diagnostic Analyze GPU fleet tool output
Analyze output from a GPU fleet tool (gpud, gpu-burn/DCGM, nvbandwidth/perftest, py-spy, nvitop/nvtop, HTA traces, genai-perf/vLLM bench, hwloc/lstopo, LBNL NHC, SuperBench, dynolog, memray/scalene, hf-mem/torchsnapshot, nccl-tests). Leave toolId as "auto" to detect the tool from the output. Needs a Denpex API key: Team and higher plans cover all 14 tools, Free covers 05-nvitop-nvtop, 08-hwloc-lstopo and 13-hf-mem-snapshot. For crash logs use diagnose_crash instead. Use the local Denpex CLI for files that must stay on the host. The report is advisory.
| Parameter | Type | Description |
|---|---|---|
input * | string | Raw tool output or a JSON document as text. |
toolId | string | Which tool produced the output; "auto" detects it. |
launch_gate Gate a job before it lands on a bad GPU
Evaluate the EXACT allocation a scheduler is about to hand out, these nodes, these GPU indices, against what Denpex knows about them: quarantined or repeat-offender cards, split driver versions inside one collective, software combinations that have crashed and never completed, degraded fabric links, an incomplete distributed checkpoint, storage about to hit ENOSPC. Returns GO / GO_WITH_WARNING / REQUIRE_APPROVAL / BLOCK with the evidence for each. Advisory unless `enforce` is true. IMPORTANT: a check Denpex could not evaluate is reported as unknown, never as a pass, read `evidenceCoverage` bef…
| Parameter | Type | Description |
|---|---|---|
gpus * | array | Every GPU the scheduler proposes to allocate. |
checkpoint | object | |
enforce | boolean | Apply the verdict. Default false, advisory only. |
jobName | string | |
stack | object | Software the job will run with. Omitting it makes the known-bad-cohort check report unknown. |
storage | object |
preflight_check Preflight a cluster before a large job
Answer 'is this cluster safe to launch on?' BEFORE you burn GPU-hours on a job that will die in the first ten minutes. Feed it the health artifacts from the nodes you are about to use, `nvidia-smi -q`, `ibstat`, `nvidia-smi topo -m`, `dmesg -T`, and it returns the critical blockers (dead links, missing GPUs, non-NVLink topology, driver mismatch) that would take the run down. Scale+ feature.
| Parameter | Type | Description |
|---|---|---|
dir | string | Directory to scan for the newest artifact file. |
file | string | Path to a file containing them. |
logs | string | Paste the health artifacts (nvidia-smi -q, ibstat, nvidia-smi topo -m, dmesg -T). |
compare_runs Compare a working run against a failing one
'It worked yesterday.' Give it the logs from the run that worked and the run that failed, and it isolates what actually changed between them instead of re-diagnosing the failure from scratch. Use this whenever a previously-green job starts failing.
| Parameter | Type | Description |
|---|---|---|
failLogs * | string | Logs from the run that failed. |
successLogs * | string | Logs from the run that worked. |
diff_environments Diff the package/driver environment of two runs
Diff the SOFTWARE environment between a good run and a bad one, torch / CUDA / NCCL / driver / flash-attn versions, env vars, and flag combinations known to be broken. Feed it `pip freeze`, `nvidia-smi`, `env` output (or the whole job log; it extracts what it needs). Use this when `compare_runs` points at a version change, or when a job breaks after an image rebuild.
| Parameter | Type | Description |
|---|---|---|
badRun * | string | The same artifacts from the failing run. |
goodRun * | string | Artifacts from the last good run (pip freeze / nvidia-smi / env, or the full log). |
failureLogs | string | Optional: the failure output itself, for fingerprinting. |
validate_checkpoint Inspect supplied checkpoint integrity evidence
Inspect directory listings, checksum output and load errors for signs of checkpoint corruption. Supplied metadata does not verify full shard coverage, compatible optimizer state or successful workload recovery. Validate actual loading and intended progress before resuming.
| Parameter | Type | Description |
|---|---|---|
directoryListing | string | Output of `ls -la` (or `ls -la --time-style=full-iso`) on the checkpoint directory. |
failureType | string | The diagnosed failure type, if you have one, it sharpens the verdict. |
loadErrors | string | Any error output from trying to load a checkpoint. |
sha256Output | string | Output of `sha256sum -c MANIFEST.sha256`, if you keep a manifest. |
node_health Score every monitored node's health
Score the health of every node Denpex is monitoring in your fleet, worst first. Use it to answer 'which nodes should I exclude from this job?' before scheduling, or 'what else is degrading?' after an incident. Scale+ feature; requires the Denpex agent to be reporting.
predict_failures List nodes trending toward failure
List the predictive risk scores Denpex has computed for your fleet, nodes whose counters are trending toward a failure that has not happened yet (rising correctable ECC, row-remap pressure, PCIe replays, thermal drift). Use it to drain a node on your schedule instead of the cluster's. Scale+ feature.