Find ML mistakes before they become expensive experiments.
DataSmell is the first developer-focused code smell detector built specifically for Machine Learning and Data Science code. It works locally and directly inside VS Code, analyzing Python files and Jupyter notebooks in real-time.

Why DataSmell?
Generic tools like SonarLint, ESLint, and Pylint don't understand Machine Learning workflows. DataSmell detects ML-specific bad practices like data leakage, missing random seeds, train/test pollution, and GPU memory leaks, helping you build robust models.
Features
- Real-Time Analysis: Detects issues as you type, highlighting them directly in the editor.
- Notebook Support: Analyzes Jupyter Notebook cells natively.
- Data Leakage Detection: Alerts when you fit a scaler before splitting your data.
- GPU Memory Checks: Catches missing
torch.cuda.empty_cache()and missingmodel.eval(). - Beautiful Dashboard: Open the DataSmell Dashboard to see your Project Health Score and rule counts.
- Quick Fixes: One-click quick fixes for missing seeds, deprecated APIs, etc.
- 100% Local: No backend, no API keys, no data leaves your machine.
Supported Rules
| Rule ID | Severity | Description | Quick Fix |
|---|---|---|---|
data-leakage |
Critical | Fitting scaler/encoder before split | No |
missing-random-seed |
Major | train_test_split or models missing seed |
Yes |
gpu-memory |
Major | Missing empty_cache or eval |
No |
deprecated-api |
Major | Deprecated Pandas/sklearn APIs | Yes |
hardcoded-path |
Major | Hardcoded local paths (e.g., C:) | No |
large-csv-loading |
Info | Loading huge CSV without chunksize | Yes |
missing-evaluation |
Major | Trained model never evaluated | No |
Configuration
You can customize DataSmell in your VS Code settings:
datasmell.enableNotebook: Analyze Jupyter Notebooks (default: true)datasmell.enableLeakageCheck: Enable data leakage checks (default: true)datasmell.enableGPUChecks: Enable GPU memory checks (default: true)
Privacy
DataSmell runs entirely on your local machine using a bundled AST parser. It does not send your code or telemetry to any external servers.
License
MIT