Skip to content

Commit

Permalink
exp run: add options from repro (#4704)
Browse files Browse the repository at this point in the history
* exp run: add options from repro

* drop repro options mention in exp run
  • Loading branch information
Dave Berenbaum authored Jul 18, 2023
1 parent 1e78eae commit 5fc7d23
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 9 deletions.
64 changes: 58 additions & 6 deletions content/docs/command-reference/exp/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ When called with no arguments, this is equivalent to `dvc repro` followed by
## Synopsis

```usage
usage: dvc exp run [-h] [-q | -v] [-f]
{ repro options ... } [-n <name>]
[-S [<filename>:]<override_pattern>]
usage: dvc exp run [-h] [-q | -v] [-f] [-i]
[-s] [-p] [-P] [-R]
[-n <name>] [-S [<filename>:]<override_pattern>]
[--queue] [--run-all] [-j <number>] [--temp]
[-r <experiment_rev>] [-C <path>]
[-m <message>]
[--downstream] [--force-downstream]
[--pull] [--dry] [--allow-missing]
[-k] [--ignore-errors]
[targets [targets ...]]
positional arguments:
Expand Down Expand Up @@ -79,9 +82,6 @@ committing them to the Git repo. Unnecessary ones can be [cleared] with

## Options

> In addition to the following, `dvc exp run` accepts the options in `dvc repro`
> except for `--glob`, `--no-commit`, and `--no-run-cache`.
- `-S [<filename>:]<override_pattern>`,
`--set-param [<filename>:]<override_pattern>` - set the value of `dvc params`
for this experiment. This will update the parameters file (`params.yaml` by
Expand Down Expand Up @@ -135,6 +135,58 @@ committing them to the Git repo. Unnecessary ones can be [cleared] with
- `-m <message>`, `--message <message>` - custom message to use when saving the
experiment. If not provided, `dvc: commit experiment {hash}` will be used.

- `-i`, `--interactive` - ask for confirmation before reproducing each stage.
The stage is only executed if the user types "y".

- `-s`, `--single-item` - reproduce only a single stage by turning off the
recursive search for changed dependencies. Multiple stages are executed
(non-recursively) if multiple stage names are given as `targets`.

- `-p`, `--pipeline` - reproduce the entire pipelines that the `targets` belong
to. Use `dvc dag <target>` to show the parent pipeline of a target.

- `-P`, `--all-pipelines` - reproduce all pipelines for all `dvc.yaml` files
present in the DVC project. Specifying `targets` has no effects with this
option, as all possible targets are already included.

- `-R`, `--recursive` - looks for `dvc.yaml` files to reproduce in any
directories given as `targets`, and in their subdirectories. If there are no
directories among the targets, this option has no effect.

- `--downstream` - only execute the stages after the given `targets` in their
corresponding pipelines, including the target stages themselves. This option
has no effect if `targets` are not provided.

- `--force-downstream` - in cases like `... -> A (changed) -> B -> C` it will
reproduce `A` first and then `B`, even if `B` was previously executed with the
same inputs from `A` (cached). To be precise, it reproduces all descendants of
a changed stage or the stages following the changed stage, even if their
direct dependencies did not change.

It can be useful when we have a common dependency among all stages, and want
to specify it only once (for stage `A` here). For example, if we know that all
stages (`A` and below) depend on `requirements.txt`, we can specify it in `A`,
and omit it in `B` and `C`.

This is a way to force-execute stages without changes. This can also be useful
for pipelines containing stages that produce non-deterministic (semi-random)
outputs, where outputs can vary on each execution, meaning the cache cannot be
trusted for such stages.

- `--pull` - attempts to download the missing dependencies of stages that need
to be run. Unless `--no-run-cache` is passed, it will also try to download the
[run cache] and the outputs of stages that are already present in it.

- `--allow-missing` - skip stages with no other changes than missing data.

- `-k`, `--keep-going` - Continue executing, skipping stages having dependencies
on the failed stage. The other dependencies of the targets will still be
executed.

- `--ignore-errors` - Ignore all errors when executing the stages. Unlike
`--keep-going`, stages having dependencies on the failed stage will be
executed.

- `-h`, `--help` - prints the usage/help message, and exits.

- `-q`, `--quiet` - do not write anything to standard output. Exit with 0 if all
Expand Down
6 changes: 3 additions & 3 deletions content/docs/command-reference/repro.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Reproduce complete or partial <abbr>pipelines</abbr> by running their

```usage
usage: dvc repro [-h] [-q | -v] [-f] [-i]
[-s] [-p] [-k] [-P] [-R]
[-s] [-p] [-P] [-R]
[--downstream] [--force-downstream]
[--pull] [--dry] [--allow-missing]
[--pull] [--allow-missing] [--dry]
[--glob] [--no-commit] [--no-run-cache]
[--ignore-errors]
[-k] [--ignore-errors]
[targets [<target> ...]]
positional arguments:
Expand Down

0 comments on commit 5fc7d23

Please sign in to comment.