Skip to main content

dset — version control for datasets

Commit, diff, and roll back millions of files the way you already do with code — and see what actually changed: samples, classes, label distributions. Not bytes.

Pure Python, zero dependencies, single file.

Install

pip install .

(from this folder — or just run python dset/cli.py ... directly)

Quick start

cd my-dataset
dset init
dset add images/ labels.csv
dset commit "June survey, initial labels"

# ... collect more data, fix labels ...

dset add .
dset commit "July imagery + relabeling pass"

dset diff v1 v2

Output:

comparing v1 → v2  (301 → 406 files)

  files       +120   −15   ~1 modified
  images      +120   −15
  labels      ~1 modified
  size        1.5 MB → 2.1 MB  (+568.2 KB)

  class       acacia  19.7% → 38.8%  (+19.1%)
  class       shrub   43.7% → 33.3%  (−10.3%)
  class       bare    36.7% → 27.9%  (−8.8%)

Go back to any version, exactly:

dset checkout v1

Commands

command what it does
dset init start tracking the current directory
dset add <paths> stage files or folders (incremental — unchanged files are skipped)
dset status staged / modified / deleted / untracked files
dset commit "msg" snapshot as a new version (v1, v2, ...) with dataset stats
dset log list versions with file counts and sizes
dset diff <a> <b> semantic diff: file counts by type, size, class distribution shift
dset checkout <ref> restore the working tree to a version (--force to discard changes)
dset check [path] quality scan: duplicates, corruption, leakage, imbalance, outliers (--fix to quarantine)

Refs can be a tag (v3), HEAD, or a commit-id prefix.

How it works

  • Content-addressed storage. Every file is hashed (SHA-256) and stored once under .dset/objects/, like git. A new version costs only what changed; re-adding identical data costs nothing.
  • Commits are manifests — JSON maps of path → hash. Checkout rebuilds the working tree from objects, restoring and deleting as needed.
  • Semantic stats are computed at commit time (file counts by type, total size, class distribution parsed from CSV/TSV label files with a label/class/category/target column), so dset diff is instant even on huge datasets.
  • Safe by construction. Objects are copied (never hard-linked), written atomically, and stored read-only, so editing a working file can never corrupt history. On btrfs/XFS the copy is a free copy-on-write clone.
  • Uncommitted changes block dset checkout unless you pass --force.

dset check — the quality engine

dset check ./my-dataset            # scan and score
dset check ./my-dataset --fix      # also quarantine exact dups + corrupted

Scans every image (parallel, ~2,000 images/sec) and reports:

  • corrupted / unreadable images
  • exact duplicates (content hash) and near-duplicates (perceptual dhash + LSH)
  • train/test leakage — exact and near-duplicate pairs across train/ and test/
  • class imbalance (parsed from CSV/TSV label files)
  • outliers: anomalous file size, odd resolutions, near-blank images
  • images missing from label files, and label rows pointing to missing files

Prints a health score out of 100 and writes a browsable dset_report.html. --fix never deletes anything — it moves exact duplicates and corrupted files to _dset_quarantine/ for you to review.

Requires Pillow (installed automatically with the package).

Current limits (MVP)

  • Class stats read CSV/TSV label files only (COCO/YOLO parsers are next).
  • No remote yet — dset push / dset pull to a self-hosted server is the next milestone.
  • No .dsetignore yet; hidden files and dot-directories are always skipped.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dset_cli-0.2.1.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dset_cli-0.2.1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file dset_cli-0.2.1.tar.gz.

File metadata

  • Download URL: dset_cli-0.2.1.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.7

File hashes

Hashes for dset_cli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 10f2c3576cc5c0619c617d8fb1d7a935e4203c46e419e4a2c0f2e92a6d417d2d
MD5 f226be11f46d89af98faf0aabe95a2b5
BLAKE2b-256 d9ab8d96e569308cdfacea2dabfbad7193083a69982881b30ed633e0d1796983

See more details on using hashes here.

File details

Details for the file dset_cli-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: dset_cli-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.7

File hashes

Hashes for dset_cli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc61a7dfbe4e097859e5402efaa50ab6f7677709ea44fdc0e20e44f6c92143d1
MD5 e53db749eeef9e873b4ea778a883ebcb
BLAKE2b-256 0f66b9fc4945c8af6e3722c1f116c0e67674a2481bc351dfb8399ba6faf7043f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page