Skip to content

Commit

Permalink
Revert "Update the cmd entry of the dvc.yaml file to add cmd as list …
Browse files Browse the repository at this point in the history
…option (#1980)"

This reverts commit 23247d8.
  • Loading branch information
jorgeorpinel committed Dec 21, 2020
1 parent 28f46ee commit 365b768
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
14 changes: 5 additions & 9 deletions content/docs/command-reference/repro.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ commands (`cmd` field of `dvc.yaml`). [Stage](/doc/command-reference/run)
outputs are deleted from the <abbr>workspace</abbr> before executing the stage
commands that produce them (unless `persist: true` is used in `dvc.yaml`).

For stages with multiple commands (having a list in the `cmd` field), commands
are run one after the other in the order they are defined. The failure of any
command will halt the remaining stage execution, and raises an error.

There are a few ways to restrict what will be regenerated by this command: by
specifying specific reproduction [`targets`](#options), or by using certain
command [options](#options), such as `--single-item` or `--all-pipelines`.
Expand Down Expand Up @@ -185,7 +181,7 @@ up-to-date and only execute the final stage.

- `-q`, `--quiet` - do not write anything to standard output. Exit with 0 if all
stages are up to date or if all stages are successfully executed, otherwise
exit with 1. The commands defined in the stage are free to write output
exit with 1. The command defined in the stage is free to write output
regardless of this flag.

- `-v`, `--verbose` - displays detailed tracing information.
Expand Down Expand Up @@ -268,8 +264,8 @@ If we now run `dvc repro`, we should see this:
```dvc
$ dvc repro
Stage 'filter' didn't change, skipping
Running stage 'count':
> python process.py numbers.txt > count.txt
Running stage 'count' with command:
python process.py numbers.txt > count.txt
Updating lock file 'dvc.lock'
```

Expand Down Expand Up @@ -305,8 +301,8 @@ of only the target (`count`) and following stages (none in this case):

```dvc
$ dvc repro --downstream count
Running stage 'count':
> python process.py numbers.txt > count.txt
Running stage 'count' with command:
python process.py numbers.txt > count.txt
Updating lock file 'dvc.lock'
```

Expand Down
9 changes: 2 additions & 7 deletions content/docs/user-guide/dvc-files-and-directories.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ stages:
- performance.json
training:
desc: Training stage description
cmd:
- pip install -r requirements.txt
- python train.py
cmd: python train.py
deps:
- train.py
- features
Expand All @@ -156,10 +154,7 @@ stages:
by the user with the `--name` (`-n`) option of `dvc run`. Each stage can contain
the following fields:

- `cmd` (always present): One or more commands executed by the stage (may
contain either a single value, or a list). Commands are executed sequentially
until all are finished or until one of them fails (see
[`dvc repro`](/doc/command-reference/repro) for details).
- `cmd` (always present): Executable command defined in this stage
- `wdir`: Working directory for the stage command to run in (relative to the
file's location). If this field is not present explicitly, it defaults to `.`
(the file's location).
Expand Down

0 comments on commit 365b768

Please sign in to comment.