From 590a053d1d868b9198866d4340e77c682d194252 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Sat, 20 Jun 2020 21:12:13 -0500 Subject: [PATCH 1/2] cmd ref: add stage exec subsection to run --- content/docs/command-reference/run.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/content/docs/command-reference/run.md b/content/docs/command-reference/run.md index b1be38a4cb..b924527b8d 100644 --- a/content/docs/command-reference/run.md +++ b/content/docs/command-reference/run.md @@ -148,6 +148,22 @@ time functions, hardware dependencies, etc.) +### Stage execution and reproduction + +`dvc run` executes the given `command` so the defined outputs are written, +unless the same `dvc run` has already happened in this workspace. +Put in other words, if an identical stage already exists in +[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-files), and its +outputs correspond to the cached files (hash values are compared), +then `dvc run` does not execute the `command`. + +`dvc repro` provides an interface to check the status (see also `dvc status`), +and reproduce stages and pipelines created with `dvc run` by executing (again) +the necessary stages. + +> Note that stages without dependencies are considered always changed, so +> `dvc repro` always executes them. + ## Options - `-n `, `--name ` (required) - specify a name for the stage From 546dfd1943c2a8d179aeac4ae2034418cb4d8ebd Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Sat, 20 Jun 2020 23:06:58 -0500 Subject: [PATCH 2/2] cmd ref: link from desc to stage execution subsection (jump to) --- content/docs/command-reference/run.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/docs/command-reference/run.md b/content/docs/command-reference/run.md index 0d19b2bb66..2f9ee6260f 100644 --- a/content/docs/command-reference/run.md +++ b/content/docs/command-reference/run.md @@ -34,8 +34,9 @@ kinds of stage [dependencies and outputs](#dependencies-and-outputs). The remaining terminal input provided to `dvc run` after `-`/`--` flags will become the required [`command` argument](#the-command-argument). -As suggested in its name, `dvc run` executes stage commands when used, unless -the `--no-exec` option is used. +As suggested in its name, `dvc run` +[executes stages](#stage-execution-and-reproduction) when used, unless the +`--no-exec` option is used. ### Dependencies and outputs