ml-debug

Diagnose ML training failures and generate actionable debug reports from logs.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/nishide-dev/claude-code-ml-research --skill ml-debug-nishide-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ml-debug
Source: https://github.com/nishide-dev/claude-code-ml-research/tree/main/skills/ml-debug
Command: npx skills add https://github.com/nishide-dev/claude-code-ml-research --skill ml-debug-nishide-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you diagnose and resolve common ML training failures such as NaN loss, CUDA out-of-memory, slow throughput, and convergence problems.

Core Features & Use Cases

  • Categorized debugging for Loss issues, Performance issues, Memory issues, and Data issues so you can quickly find the right remediation path.
  • Actionable fixes including learning-rate adjustments, gradient clipping, numerical-stability improvements, mixed precision toggles, gradient accumulation, checkpoint and profiling workflows.
  • Framework-aware guidance with PyTorch Lightning and PyTorch Geometric specific checks for over-smoothing and graph OOM scenarios.

Quick Start

Use the debug report generator to analyze your training logs in logs/ and produce a structured report of metrics, checkpoints, and recommendations.

Frequently Asked Questions about ml-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug NaN loss and CUDA out of memory errors during PyTorch Lightning training?

Debug NaN loss and CUDA OOM during PyTorch Lightning training by categorizing symptoms, mapping them to root causes like gradient overflow, and prescribing fixes such as gradient clipping or mixed precision toggles to restore stability.

Why does my PyTorch Geometric GNN training fail with graph out of memory and over-smoothing issues?

PyTorch Geometric GNN training failures from graph OOM and over-smoothing are resolved through framework-aware checks that diagnose node memory limits and prescribe configuration adjustments to prevent layer degradation.

What is the best way to troubleshoot slow training throughput and convergence problems in PyTorch?

Troubleshoot slow training throughput and convergence problems by inspecting GPU utilization and loss metrics from logs, then applying checkpoint and profiling workflows to identify bottlenecks and adjust learning rates.

Can I generate a debug report from existing training logs and checkpoints?

You can generate a structured debug report from existing training logs and checkpoints by analyzing metrics in your logs directory, mapping performance and data symptoms to root causes, and outputting actionable remediation steps.

How do I fix training failures when learning rate adjustments are not enough to stop loss instability?

Fix training failures beyond learning rate adjustments by implementing numerical stability improvements, gradient accumulation, and mixed precision toggles to address underlying data issues and prevent loss divergence.

Does this debugging workflow support Hydra configs for experiment troubleshooting?

The debugging workflow supports experiment troubleshooting with Hydra configs by mapping categorized training symptoms to likely root causes and prescribing configuration or code-level fixes to resolve failures.