Skip to content

leoyala/dstrack

Repository files navigation

dstrack

Unit Tests codecov

dstrack logo

A Python package for versioning and monitoring dataset changes throughout the machine learning lifecycle.

Overview

dstrack helps data scientists and ML engineers track how datasets evolve over time, catching schema drift, distribution shifts, and unexpected mutations before they silently break pipelines or degrade model performance.

Installation

pip install dstrack

Requires Python 3.11 or later.

Getting started

Initialize a store in your project, then take your first snapshot.

1. Create a local store - this adds a .dstrack/ directory at the current location:

dstrack init
ℹ Generating local store structure at /path/to/.dstrack.
✔ Finished creating local store: /path/to/.dstrack

2. Track a dataset - point dstrack at a data file to snapshot it. Given a small data.csv:

id,name,value
1,alpha,10.5
2,beta,20.0
3,gamma,15.25
dstrack track data.csv
ℹ Reading data.csv and computing snapshot...
✔ Snapshot <snapshot-uuid> written (new dataset, dataset <dataset-uuid>).
ℹ Stored at /path/to/.dstrack/datasets/<dataset-uuid>/snapshots/<snapshot-uuid>.json

3. Re-track as the data changes - running track again on the same path extends the dataset's lineage instead of starting a new one:

dstrack track data.csv
✔ Snapshot <snapshot-uuid> written (continued lineage, dataset <dataset-uuid>).

Each snapshot captures the file's schema, a content fingerprint, and per-column statistics. See the Getting Started guide for options such as --name, --reader, and --dataset-id.

Features

  • Dataset versioning - snapshot a dataset and track its lineage across pipeline stages
  • Rich snapshots - schema hash, content fingerprint, and per-column statistics (ranges, null rates, and more)
  • CSV out of the box - pure standard-library reader, no heavy dependencies
  • Lightweight CLI - a small, git-like local store you can commit alongside your code

Roadmap

Change detection and drift monitoring are on the way - comparing snapshots, surfacing schema and distribution shifts, and failing CI on drift. See the roadmap for what's planned.

About

A Python package for versioning and monitoring dataset changes throughout the machine learning lifecycle.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages