Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

trainlint statically checks common ML training mistakes

AI summary

Developer Satvik-jain created trainlint, a static checker for machine-learning training and evaluation code that identifies mistakes that may not cause a program to crash, including preprocessing leakage, incorrect evaluation mode, and logits-loss errors. The tool parses code by name and therefore requires no data, model, or GPU; the author says it currently supports only PyTorch and scikit-learn. In a manual review of findings in pytorch/examples, the author identified 20 real issues and two correct but harmless findings among 22 results, but did not report recall measurements.

In-depth insight

Trainlint offers a lightweight way to catch consequential training-code errors before execution, although its name-based approach and limited PyTorch and scikit-learn support constrain where it can be used reliably.

I wrote a small checker for training and evaluation code. It looks for mistakes that do not raise

errors. The classic one is leakage through preprocessing. With 5,000 random features and random

labels, picking the top 20 features on the full dataset and then running 5-fold cross-validation

gives 85% accuracy (87.7% averaged over 20 seeds). Doing the selection inside a Pipeline gives 48%

(50.0%). Nothing can beat 50% on that data, so the whole gap is leakage.

trainlint finds that pattern statically, along with thirteen others: eval() left on during

#trainlint#PyTorch#scikit-learn

Original · 1 min readRead the original
Group chat

No comments yet. Start the conversation.