Torch Clinic

Paste your PyTorch code — posture, inventory, ranked findings, corrected snippets.

Back to SkillSafe
Or pick files: they are read locally, nothing uploads until you run.
Context — hardware, versions, symptoms, anything already handled elsewhere
How it works

Nothing to hand? Load the — a softmax feeding CrossEntropyLoss, an epoch loss summed with the autograd graph attached, validation in train mode without no_grad, hardcoded .cuda(), no seed and no checkpoints — or the , where the correct verdict is train-ready and the useful output is what to add next.

1

Paste the code — the prescan is free

No upload, no AI: the prescan reads your source in the browser and lists what it mechanically found. The module and loop inventory, then the flags — backward() without zero_grad(), backward without optimizer.step(), softmax feeding CrossEntropyLoss and sigmoid feeding BCEWithLogitsLoss, loss accumulated without .item(), validation loops never switched to eval mode or wrapped in torch.no_grad(), missing seeds, hardcoded .cuda(), DataLoaders left at num_workers=0, retain_graph=True, epoch loops with no checkpoint, and secret-looking literals. Each group explains why it matters, shows the standard fix as a Python fragment you can copy, and every flag is clickable — click one and the cursor lands on the line it refers to. Copy prescan report hands you the whole thing as a tickable Markdown checklist for a ticket or a colleague. This part costs nothing, needs no account, and happens while you type.

2

The AI reviews it — this is the metered part

A senior deep-learning engineer's pass: a training-trustworthiness posture with the single most important change named, the inventory with each construct's role, and prioritized findings across correctness, performance, memory, reproducibility, data and hygiene — each with the problem, the concrete impact on the run and the metric, the fix and a corrected Python fragment. Every prescan flag is confirmed or explicitly set aside. Findings may only cite modules, loops, functions and variables that actually appear in your code. Pricing is honest: a worst-case amount is reserved before the run and only what the run actually uses is charged — the meter next to the button shows both.

3

Fix, export, re-run

Every corrected snippet in one paste-ready block, the findings as GitHub PR review comments with ```suggestion fences you can apply from the review UI, a tickable action checklist for the ticket, the findings table as CSV, and Markdown or JSON export of the whole review. Then start fixing: the prescan re-runs as you edit and the strip above the run button counts the flags you have cleared, the ones still open and any you have just introduced — in the browser, for free, before you pay for a second review. Reviews are saved to your SkillSafe account when you are signed in, so they follow you to another machine; restore puts the code back in the form too, and each saved review shows how its posture and finding counts moved against your previous review of the same script.

Derived from the @pytorch/pytorch skill (BSD-style license).