asmit dash
Open-source library

dash-mlguard

Open source · shipped to PyPI

Lint for ML training pipelines - catches silent bugs before they ship.

What it is

A static-analysis layer for ML training data (ESLint-for-training-sets). Import, call, get a PDF report. Pure Python, deterministic, runs in seconds, depends only on pandas and numpy. dash-mlguard does not train any model and does not call any LLM.

Why it's needed

Every ML pipeline has small mistakes that go unnoticed: a column derived from the label sneaks in; the test set was sampled before the split was made; two columns are byte-identical; the same user appears in train and test; StandardScaler.fit_transform was called before the split. Each one looks fine in code review, silently inflates evaluation metrics, and then production happens and the model collapses. These are data-hygiene bugs; retrievers, rerankers, and hyperparameter sweeps don't fix them.

What it does

dash-mlguard catches 14 classes of these bugs deterministically, including exact-duplicate rows leaking train→test, near-duplicates from numeric round-off, target leakage tiered by feature↔label association strength, train/test distribution drift (KS for numeric, PSI for categorical), severe class imbalance, schema mismatch, ID-like features, temporal leakage, group leakage (same user in train and test), preprocessing leakage, and target-aware encoders without cross-validation. Each finding lists affected columns, severity, and a fix.

How to use it

Install it:

pip install dash-mlguard

Then call it:

import dash_mlguard

report = dash_mlguard.check(X_train, y_train, X_test=X_test, y_test=y_test)
print(report)

if not report.ok():
    raise SystemExit("Fix the critical issues before training.")

Links