DVC Experiments Overview
ML experiments can be saved with DVC automatically as they're run or manually after they complete. Each experiment creates and tracks a variation of your data science project based on the changes in your workspace.
Experiments preserve a connection to the latest commit in the current branch
HEAD) as their parent or baseline, but do not form part of the regular
Git tree. This prevents bloating your repo with temporary commits and branches.
See 👨💻 Get Started: Experiments for a hands-on introduction to DVC experiments.
To save an experiment, you can follow one of these roads:
- If you do not have a DVC pipeline, you can log live results from Python code
using DVCLive initialized with
- If you have a DVC pipeline, use
dvc exp runto both run your code pipeline and save experiment results.
dvc exp runalso enables advanced features like queuing many experiments at once.
Experiments are saved locally by default but you can share them so that anyone can reproduce your work.
Metrics, plots, parameters
DVC can track and compare parameters, metrics, and
plots data saved in standard structured files like YAML, JSON, and
CSV, and they can be tracked as part of your repo. One way to generate these
parameters, metrics, and plots (and to automatically configure them) is with
DVCLive. You can also manually generate these files and use
metafiles to specify which files are parameters, metrics, or plots (and to
specify how to visualize plots).
Models and datasets
DVC can track models or datasets as part of your repo, and you can manage those
models with Studio Model Registry. One way to log models or other artifacts is
with DVCLive. You can also track them with
dvc add and declare metadata for
the Studio Model Registry in
Work with DVC Experiments from a GUI
DVC Experiments can be used directly from the VS Code IDE or online with Iterative Studio, the web UI that integrates all of our data science tools.