AboutWhat I doProjectsLabContact

Data

splitcheck

Detect rows leaking between train, validation and test splits.

splitcheck on PyPIsplitcheck downloads per monthsplitcheck CI statusMIT license0 downloads/month on PyPI

Install

pip install splitcheck

If you use uv, also as an isolated CLI:

uv tool install splitcheck

Try it in your browser

5 / 4train.csv / test.csv rows
2rows leaked from train
50.0%leakage
0duplicates inside test

2 test rows also present in train. (lines 2, 4) Same logic as the CLI's exact-match check, running locally. Nothing is sent anywhere.

What it does

A row that appears in both train and test inflates every metric and is easy to introduce by accident. splitcheck compares your splits and reports how much of one appears in another, both exact and after normalization.

In action

A real recorded session of the CLI running.

Read it as text
target  in source  exact  normalized  leakage
test    train          3           3     3.6%
train   test           3           3     1.5%
splitcheck: worst leakage 3.6%
$ splitcheck check train.csv test.csv
target  in source  exact  normalized  leakage
test    train          3           3     3.6%
train   test           3           3     1.5%
splitcheck: worst leakage 3.6%

Features

  • Exact and normalized overlap between splits.
  • Whole-row or single-column comparison.
  • Leakage as a fraction of the target split.
  • CI gate; reads CSV, Parquet, JSONL and text.
View the code on GitHub

Other tools

hola@jmwebsoluciones.com