CtrlK
BlogDocsLog inGet started
Tessl Logo

pytorch-training

Best practices for building robust PyTorch training loops. Use when generating or reviewing ML training code.

63

Quality

73%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./researchclaw/skills/builtin/tooling/pytorch-training/SKILL.md
SKILL.md
Quality
Evals
Security

PyTorch Training Best Practice

  1. Use torch.manual_seed() for reproducibility (set for torch, numpy, random)
  2. Use DataLoader with num_workers>0 and pin_memory=True for GPU
  3. Enable cudnn.benchmark=True for fixed input sizes
  4. Use learning rate schedulers (CosineAnnealingLR or OneCycleLR)
  5. Implement early stopping based on validation metric
  6. Log metrics every epoch, save best model checkpoint
  7. Use torch.no_grad() for evaluation
  8. Clear gradients with optimizer.zero_grad(set_to_none=True) for efficiency
Repository
aiming-lab/AutoResearchClaw
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.