pytorch-debug
Installation
SKILL.md
PyTorch Debug Assistant
Help the user diagnose and fix PyTorch errors systematically.
Debugging Method: Trace the Full Data Flow
Always trace tensors from source to error point:
- Start at the source — where does the tensor originate? (model output, checkpoint, dataloader)
- Track all transformations — follow every op that touches the data
- Note dtype/device conversions — explicit (
.float(),.cuda()) and implicit (promotions, AMP) - Identify the divergence — where does actual vs expected dtype/device/shape differ?