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.0.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.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dset_cli-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 6f3fd50179361b64fa032b93ef1f4039434655d717413f54b8bedf6a22605d03
MD5 dd3524e0a4b48f2bbaadc36f7457fc9d
BLAKE2b-256 a6398e2eb0d7047f8cbce5ba24ad2f34ef78c2b958400daa2b68636605fe48d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dset_cli-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 edc1496b6c4df9ea648a1864b31c00ef772f44547676fcd047482a74412e344b
MD5 3ffe3005fc35ca9d38c4073ed3b2482f
BLAKE2b-256 12e163aa37d8120e0422da963c161cd21fc9acc7161cfd0dbb0960bbb36e2f33

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

2 files

This release

0.2.0 This release

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