Skip to content
Latchkey

What Is Data Versioning? Tracking Dataset Versions Explained

Data versioning is the practice of tracking changes to datasets over time so any experiment can be reproduced with the exact data it used.

Code without version control is unthinkable, yet many ML teams overwrite their datasets in place and lose the ability to reproduce past results. Data versioning brings Git-like history to data: every meaningful state of a dataset becomes a referenceable version.

What data versioning is

Data versioning records the state of a dataset at points in time and lets you retrieve any past version by reference. Because datasets are large, tools usually store a small pointer or hash in Git and keep the actual bytes in object storage, fetching them on demand.

Why it matters for reproducibility

A model is a function of its training data. If the data changes silently, the same code produces a different model and you cannot tell why. Versioned data lets you pin an experiment to an exact snapshot, so "rerun this and get the same result" actually holds.

How it is implemented

Tools like DVC, lakeFS, and Git LFS keep large data out of Git while tracking its version metadata in Git. A commit then captures both the code and the data version together, so checking out a commit gives you a fully consistent state.

Versioned data in CI

In a pipeline, a checkout restores the code and a data pull restores the matching dataset version, guaranteeing the job trains on exactly the intended data.

Restoring a pinned dataset in CI
steps:
  - uses: actions/checkout@v4   # restores code + data pointers
  - run: dvc pull               # fetches the pinned data version
  - run: python train.py

Latchkey note

Datasets are often many gigabytes, so re-pulling them every run is slow and expensive. On Latchkey you can cache versioned data by its content hash so repeated runs on the same version hit the cache, and auto-retry recovers from transient object-store failures during a pull.

Key takeaways

  • Data versioning tracks dataset state over time so any experiment can be reproduced with its exact data.
  • Tools keep large data in object storage and small version pointers in Git for consistency with code.
  • Caching versioned data by content hash makes reproducing past runs in CI fast and cheap.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →