Description
Run a DVC experiment to test different hyperparameters, code changes, or data versions. This command executes your pipeline stages and tracks the results as experiments. It inherits functionality fromdvc repro but adds experiment-specific features like parameter overrides, queueing, and parallel execution.
Usage
Arguments
Stages to reproduce. Defaults to
dvc.yaml from the current directory. Can be:- Path to a
dvc.yamlor.dvcfile - Stage name from
dvc.yamlin current directory - Path followed by colon and stage name (e.g.,
path/to/dvc.yaml:stage_name)
Options
Experiment Options
Human-readable experiment name. If not specified, a name will be auto-generated.
Override parameter values for this experiment run. Can be used multiple times.Format:
[<filename>:]<param_name>=<param_value>Stage this experiment in the run queue for future execution instead of running immediately.
Execute all experiments in the run queue. Implies
--temp.Run the specified number of experiments in parallel. Useful with
--run-all.Run experiment in a separate temporary directory instead of your workspace. Prevents workspace pollution during experiments.
List of ignored or untracked paths to copy into the temp directory. Only used with
--temp or --queue.Custom commit message to use when committing the experiment.
Disable automatic updating of
params.yaml with Hydra configuration. You can still use --set-param to update individual params.Pipeline Execution Options
Reproduce even if dependencies were not changed.
Ask for confirmation before reproducing each stage.
Reproduce only single data item without recursive dependencies check.
Reproduce the whole pipeline that the specified targets belong to.
Reproduce all pipelines in the repository.
Reproduce all stages in the specified directory.
Start from the specified stages when reproducing pipelines.
Reproduce all descendants of a changed stage even if their direct dependencies didn’t change.
Try automatically pulling missing data before running.
Skip stages with missing data but no other changes.
Only print the commands that would be executed without actually executing them.
Continue executing, skipping stages having dependencies on failed stages.
Ignore errors from stages and continue execution.
Examples
Run a basic experiment
This runs your pipeline and creates an experiment with an auto-generated name.
Run with custom parameters
Queue multiple experiments
Run in temporary directory
Using
--temp keeps your workspace clean. The experiment runs in an isolated temporary directory.Test parameters without execution
Run specific pipeline stage
Common Workflows
Hyperparameter tuning
Testing code changes
Related Commands
dvc exp show- View experiment resultsdvc exp diff- Compare experimentsdvc exp apply- Apply experiment changes to workspacedvc repro- Reproduce pipelines without experiment tracking