- https://datachain.ai/blog/experiment-refs
- Type: article
- Source: DVC blog · Peter Rowlands · Apr 2021 (updated Nov 2025; now at dvc.org)
TL;DR
DVC stores each experiment as a commit under a custom Git reference (refs/exps/...), so you get experiment tracking without hundreds of branches.
Summary
Dvc 2.0’s dvc exp run reproduces the pipeline, commits parameters and outputs, and saves the commit under a generated name such as exp-26220. The ref lives in the refs/exps namespace, a normal Git commit that works with git diff by SHA but stays invisible to checkout, branch lists and most GUIs. Experiments stay local until shared explicitly.
Key takeaways
- Why not branches: hundreds of daily experiments would clutter a repository.
- Custom refs are ordinary commits stored as
refs/exps/<base-prefix>/<base-sha>/<name>. - One command replaces
dvc repro,git addandgit commit:dvc exp run. - Share explicitly with
dvc exp pushanddvc exp pull; promote withdvc exp branch. - Inspect:
dvc exp show --sha,dvc metrics diff,dvc diff. - Trade-off: experiments are hidden from standard Git tooling, so team members must use DVC commands.
Tools and concepts
| Item | Role in the page |
|---|---|
| Dvc | Experiment management |
| Git | Custom references under refs/ |
| MLOps | Experiment tracking practice |
When to use
- When explaining how DVC experiments are stored in Git.
- When deciding branches vs custom refs for experiment tracking.
- When sharing experiments between machines.
Caveats
- The page does not discuss
dvc exp applyand lists no explicit drawbacks; the trade-offs above are inferred.
Dvc Git MLOps Tuning Hyperparameters with Reproducible Experiments Oh Shit, Git