Skip to content
tezvyn:
Menu

Data Versioning: Git for Your Datasets

Source: Wikipedia: Data version controlMediumHow cards are made

Think of data versioning as Git for datasets. It tracks changes to your data, allowing you to reproduce ML experiments or roll back to a previous state. The footgun is using regular Git, which chokes on the large binary files common in ML.

Why it exists

In machine learning, the model is a function of both code and data. If your dataset changes, your model's behavior changes. Data versioning was created to solve the reproducibility crisis: without it, you can't reliably tie a specific model version to the exact dataset version it was trained on.

The mental model

Data versioning is like a Git repository, but for data. Instead of tracking changes to lines of code, it tracks changes to entire datasets. It provides a history of your data, showing who changed what and when, and allows you to check out any historical version just like a code branch.

How it works

Unlike Git, which struggles with large files, data versioning systems are optimized for this use case. They don't store a full copy of the dataset for every small change. Instead, they often use a combination of techniques like content-addressable storage and copy-on-write. This means they store a single copy of each unique file and use lightweight pointers to represent different dataset versions, making it efficient to manage terabytes of data without duplicating storage. It treats data as immutable blobs and versions the pointers to them.

When to use it

Use data versioning in any serious machine learning project where the dataset is expected to evolve. It's essential for team collaboration, allowing multiple people to work on the same data without conflicts. It is also critical for production systems to ensure you can always reproduce a model training run or debug issues by retrieving the exact data used.

When not to use it

For very small, static datasets that never change, it can be overkill. If you're doing a quick, one-off analysis on a local CSV that won't be part of a larger, long-term project, you might not need a formal versioning system. It's also less applicable to pure streaming data where a discrete 'version' is not a natural concept.

One canonical example

An MLOps team is building a recommendation engine. The initial dataset is v1. The data team then cleans the data by removing invalid user records, creating v2. Later, they add new user interaction data, creating v3. A data versioning tool allows them to commit each change with a clear message. When they find that model_v3 (trained on dataset_v3) performs poorly, they can easily revert to dataset_v2 to train and deploy a hotfix model while they debug the new data.

Interview question

To efficiently manage large datasets and avoid duplicating storage across versions, data versioning systems primarily utilize which technique?

  • a.Delegating all data storage and deduplication tasks to the underlying file system or cloud provider.
  • b.Storing a full, independent copy of the entire dataset for every new version.
  • c.Storing each unique data file once and using lightweight pointers to represent different dataset versions.Correct
  • d.Compressing all data files into a single, highly optimized archive before each commit.
Why?

Data versioning systems achieve efficiency by storing only one copy of each unique data file and using lightweight pointers to reference these files across different dataset versions, avoiding full duplication. Option B describes the inefficient approach that data versioning aims to solve.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on mlops — each one lists the topics its interview covers.

See open roles