DVC — Data Version Control for Machine Learning
DVC brings Git-like versioning to datasets, models, and ML pipelines. Large files live in S3/GCS/Azure while lightweight metafiles are tracked in Git — giving you reproducible experiments and auditable model lineage.
What it is
DVC (Data Version Control) brings Git-like versioning to datasets, machine learning models, and ML pipelines. Large binary files are stored in remote storage (S3, GCS, Azure, SSH, HDFS) while lightweight pointer files (.dvc files) are tracked in Git. This gives you reproducible experiments, auditable model lineage, and the ability to switch between data versions with git checkout.
DVC targets ML engineers, data scientists, and teams that need to track data and model artifacts alongside code without bloating the Git repository.
How it saves time or tokens
Without DVC, teams resort to naming files model_v2_final_FINAL.pkl, storing data on shared drives with no versioning, or using custom scripts to manage artifacts. DVC integrates with Git to provide dvc push, dvc pull, and dvc checkout commands that work like their Git equivalents for data. Reproducing an experiment from six months ago is a git checkout plus dvc checkout away.
How to use
- Install DVC:
pip install dvc[s3](or[gcs],[azure]for your storage backend). - Initialize in a Git repo:
git init && dvc init, add a remote:dvc remote add -d storage s3://my-bucket/dvcstore. - Track data:
dvc add data/train.csv, commit the.dvcfile to Git, and push data:dvc push.
Example
# Initialize DVC in a Git repository
pip install dvc[s3]
git init && dvc init
# Configure remote storage
dvc remote add -d storage s3://my-bucket/dvcstore
# Track a large dataset
dvc add data/train.csv
git add data/train.csv.dvc .gitignore
git commit -m 'track training data'
# Push data to remote storage
dvc push
# On another machine, pull the data
git clone <repo>
dvc pull
# Create a reproducible pipeline
dvc run -n train -d data/train.csv -d train.py -o model.pkl \
python train.py
Related on TokRepo
- Automation Tools -- ML pipeline and build tools
- Coding Tools -- Developer productivity libraries
Common pitfalls
- Forgetting to run
dvc pushafterdvc add. The data is tracked locally but not uploaded to remote storage, so teammates cannot pull it. - Not committing the
.dvcfile and updated.gitignoreto Git. Without the pointer file in Git history, you lose the ability to reproduce that data version. - Using DVC without configuring a remote for team projects. Local-only DVC tracking works for solo use but breaks collaboration.
Frequently Asked Questions
DVC moves large files into a local cache (`.dvc/cache/`) and replaces them with small pointer files (`.dvc` files) that contain a hash. The pointer file is committed to Git. The actual data is stored in a configured remote (S3, GCS, Azure). `dvc pull` downloads data from the remote using the hash.
Yes. DVC pipelines are defined in a `dvc.yaml` file where each stage specifies dependencies (data files, scripts), outputs (models, metrics), and commands. Running `dvc repro` re-executes only the stages whose dependencies have changed, similar to Make.
Yes. DVC uses Git for metadata (pointer files) and any Git host (GitHub, GitLab, Bitbucket) works. The data storage is separate and configured as a DVC remote. This means you can use GitHub for code and S3 for data without conflicts.
Git LFS stores large files on the Git server, which can become expensive and slow. DVC stores data on any storage backend you control (S3, GCS, your own server) with no per-file size limits. DVC also adds pipeline tracking and experiment management that Git LFS does not provide.
Yes. DVC Experiments lets you run and compare experiments with different parameters. Use `dvc exp run --set-param lr=0.01` to run variations, then `dvc exp show` to compare metrics across experiments in a table. This integrates with Git branches for full reproducibility.
Citations (3)
- DVC GitHub— DVC provides Git-like versioning for data and ML models
- DVC Documentation— Supports S3, GCS, Azure, SSH, and HDFS as remote storage backends
- DVC Experiments Docs— DVC Experiments for running and comparing ML experiments
Related on TokRepo
Discussion
Related Assets
Moodle — Open-Source Learning Management System
The most widely used open-source learning platform, providing course management, assessments, and collaboration tools for educators and organizations worldwide.
Sylius — Headless E-Commerce Framework on Symfony
An open-source headless e-commerce platform built on Symfony and API Platform, designed for developers who need a customizable and API-first commerce solution.
Akaunting — Free Self-Hosted Accounting Software
A free, open-source online accounting application built on Laravel for small businesses and freelancers to manage invoices, expenses, and financial reports.