AI Data Versioning Explained: How to Track Every Dataset a Model Ever Saw

AI Data Versioning Explained: How to Track Every Dataset a Model Ever Saw

AI data versioning explained simply: it is the practice of recording exactly which data a model was trained on, so that any experiment can be reproduced, any result can be audited, and any change can be rolled back. A versioned dataset has an identity, usually a hash or a commit, that never changes even when the underlying files do. The central question is why data needs versioning at all, and the answer is that a model is the product of its data as much as its code, so a model without a pinned data version cannot be reproduced, debugged or trusted.

Software teams learned this lesson for code decades ago: nobody ships a product from an unversioned codebase. Data, however, is often still handled as a folder of files that anyone can overwrite. A training run that consumed that folder today may not be reproducible tomorrow, because the folder has changed. Versioning closes that gap by giving data the same discipline code already has.

Key takeaways

  • AI data versioning records exactly which data produced a model, using immutable identities such as hashes or commits.
  • Versioning covers data, code and model together: any one alone cannot reproduce a result.
  • DVC, lakeFS and Delta Lake solve different layers of the problem and are often used together.
  • Every training run should log its data version, and every dataset change should be reviewable.
  • Versioning is a governance tool as well as an engineering one: it makes audits and rollbacks possible.

What data versioning means in practice

A data version is a named, immutable snapshot of a dataset at a point in time. Immutable means that once a version exists, its contents never change; a new version is a new snapshot, and the old one stays available. If a team discovers that a model trained on version 12 performs worse than one trained on version 11, it can compare the two versions, find what changed, and go back.

Identity is the mechanism that makes this work. A version is identified by a content hash, which is computed from the bytes of the data, or by a commit in a versioning system. The hash matters because it identifies the data itself, not a filename or a location: two files with the same bytes have the same hash, and any change to the bytes produces a different hash. Recording only a path or a branch name is not versioning, because the data at that path can still change.

Versioning also needs metadata. A version should record when it was created, where the data came from, what transformations were applied, and which runs consumed it. Without that context, a hash is just a string of characters.

Why code versioning alone is not enough

Git versions code well, but it was not designed for the large files that AI data involves. A dataset of millions of images or a table with billions of rows cannot live in a Git repository: cloning would take hours, and every change would duplicate the whole file. Teams that try usually end up with data in a shared folder and a note in the repository saying which folder was used, which is not versioning at all.

Data also changes in ways code does not. Code changes when someone edits it; data changes when a source system updates, when a label is corrected, or when a pipeline reruns with a different filter. Those changes can be silent and frequent. A model trained on Monday and retrained on Friday may have consumed different data even though nobody touched the code.

The third problem is that data, code and model change independently, and a result depends on all three. Reproducing an experiment means pinning the code commit, the data version and the model configuration together. A team that versions only code can reproduce the program but not the result. Best for: any team that retrains models regularly and needs to explain why a new model behaves differently from the old one.

The main approaches: DVC, lakeFS and Delta Lake

DVC, short for Data Version Control, extends Git to cover large files and datasets. When a file is added to DVC, a small metafile containing its hash is stored in Git, while the data itself lives in cloud storage or a local cache. Checking out a commit restores the data that belonged to it. DVC also adds pipelines and experiment tracking, so a training run can record the data version, the parameters and the results in one place. It fits teams that already live in Git and want lightweight versioning without running a server.

lakeFS takes a different approach: it brings Git-like branching, committing and merging to the whole data lake. It sits between applications and object storage, presenting a versioned view of buckets. A team can branch the lake, test a new dataset on the branch, and merge it back only when it is ready, while other consumers keep reading the main branch. It fits organisations where many teams share a lake and need isolation between experiments.

Delta Lake adds versioning to tables rather than files. Built on the Parquet format, it records every change as a transaction, supports time travel to read a table as it was at any earlier point, and enforces schema rules on write. It fits teams that work with Spark and treat their data as tables. The three tools are not rivals: a common pattern is lakeFS for the lake, Delta Lake for the tables, and DVC for the experiment files. The search results confirm DVC is now developed by the same company behind lakeFS, after lakeFS announced its acquisition of DVC in November 2025.

What to version, and what to leave out

Version the data that a model actually consumed, at the granularity that lets a team reproduce a run. For a fine-tuning job, that means the exact training and evaluation files. For a retrieval system, it means the corpus snapshot that was indexed, because an index built from a different snapshot answers differently. For a feature pipeline, it means the feature definitions and the data that produced each feature value.

Raw data should be versioned at the point it enters the system, before transformations, so that a derived dataset can always be rebuilt from its source. Intermediate outputs are worth versioning when they are expensive to recompute, and worth skipping when they are cheap to rebuild from versioned inputs. Versioning everything is a trap: storage grows, and the catalogue becomes noise.

Labels deserve special attention, because they change for reasons that are easy to miss. A label correction, a guideline change or a new annotator can alter a dataset without changing its size or its schema. Versioning the label set separately from the raw data makes those changes visible, and lets a team compare models trained under different labelling rules. For the quality checks that should run on each new version, see our guide to building an AI data quality framework, which covers validating a dataset before it is versioned and used.

Versioning in the training workflow

The practical pattern is to make the data version a first-class input to every training run. The training job records the version it consumed, alongside the code commit and the hyperparameters, in the experiment log. That record is the link between a model and its data, and it should be written automatically by the pipeline rather than typed in by hand, because manual records are the ones that go missing.

Changes to data should go through review, like changes to code. A new dataset version is proposed, its differences from the previous version are summarised, quality checks run against it, and a person approves it before it becomes the default for training.

Rollbacks need to be practised, not just possible. When a new data version degrades a model, the team should be able to return to the previous version quickly, and the system should know which models were trained on the bad version so they can be retrained or replaced. A rollback that has never been tested is a hope, not a capability.

Comparing data versioning tools

Tool What it versions How identity works Best suited to
DVC Files, datasets and models Content hash in a Git metafile Git-centred ML teams
lakeFS Whole data lake in object storage Git-like commits over buckets Shared lakes, many consumers
Delta Lake Tables on Parquet Transaction log with time travel Spark-based table pipelines
MLflow Experiments and model artefacts Run records with logged artefacts Tracking runs and models
Checksum manifest Any dataset release Per-file hashes in a manifest Small, rarely changing datasets
Git LFS Large files in Git Pointer files in Git Small files with a Git workflow

The table shows that the choice depends on the layer being versioned. Many teams combine tools: a manifest or DVC for the experiment files, lakeFS or Delta Lake for the lake and tables, and MLflow for the run records that tie data, code and model together.

A branching version-history diagram with connected nodes on a large screen in an office
Branching a dataset lets a team test a new version without disturbing the version that production models already depend on.

AI data versioning checklist

  • Every dataset has an immutable identity, such as a content hash or a commit, not just a path.
  • Each training run logs the data version, code commit and hyperparameters together.
  • Raw data is versioned on entry, before any transformation is applied.
  • Label changes are versioned separately so they can be seen and compared.
  • New dataset versions go through review and quality checks before becoming the default.
  • Retrieval corpora and feature data are versioned at the snapshot that was actually used.
  • Version metadata records source, transformations, creator and consuming runs.
  • Rollbacks are tested, and affected models are identified when a bad version is found.
  • Old versions are retained for as long as audit and reproduction require.
  • One tool owns each layer, so two systems never version the same bytes differently.

Frequently asked questions

What is the difference between data versioning and data lineage?

Versioning records which snapshot of the data was used, so a result can be reproduced. Lineage records how data flowed and changed through a pipeline, so a problem can be traced to its source. The two complement each other: versioning pins the data, and lineage explains where it came from.

Can data be versioned in Git directly?

Small datasets can, but large ones should not. Git stores every version of every file, so large data makes repositories slow to clone and expensive to store. Tools such as DVC and Git LFS keep the data in separate storage and store only a small pointer file in Git.

How long should old data versions be kept?

As long as the models trained on them are in use, and as long as audit or regulatory requirements demand. In practice that often means keeping versions for the lifetime of the model, plus the retention period the organisation owes its regulators. Storage is cheaper than an unreproducible model.

Does versioning slow down data pipelines?

It adds a small overhead: computing hashes, writing metadata and recording versions. That cost is usually far smaller than the cost of debugging an unreproducible model or retraining because nobody knows which data was used. The overhead can be kept low by versioning at the dataset level rather than per row.

Should every data change create a new version?

Every change that affects what a model consumes should. Routine refreshes that only add new rows still create a new version, because the training set changed. Trivial changes to data nobody consumes can be skipped, but the rule should be explicit rather than left to habit.

Which versioning tool should a small team start with?

DVC is the usual starting point for a small team, because it needs no server and builds on Git, which the team already uses. A checksum manifest is enough for a dataset that changes rarely. lakeFS and Delta Lake become worth the setup when a shared lake or a table pipeline is involved.

Latest articles

Scroll to Top