-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into get-started-1.0-experiments
- Loading branch information
Showing
22 changed files
with
424 additions
and
488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# dag | ||
|
||
Show [stages](/doc/command-reference/run) in a pipeline that lead to the | ||
specified stage. By default it lists | ||
[DVC-files](/doc/user-guide/dvc-files-and-directories). | ||
|
||
## Synopsis | ||
|
||
```usage | ||
usage: dvc dag [-h] [-q | -v] [--dot] [--full] [target] | ||
positional arguments: | ||
targets Stage or output to show pipeline for (optional) | ||
Finds all stages in the workspace by default. | ||
``` | ||
|
||
## Description | ||
|
||
A data pipeline, in general, is a series of data processing | ||
[stages](/doc/command-reference/run) (for example console commands that take an | ||
input and produce an <abbr>output</abbr>). A pipeline may produce intermediate | ||
data, and has a final result. Machine learning (ML) pipelines typically start a | ||
with large raw datasets, include intermediate featurization and training stages, | ||
and produce a final model, as well as accuracy | ||
[metrics](/doc/command-reference/metrics). | ||
|
||
In DVC, pipeline stages and commands, their data I/O, interdependencies, and | ||
results (intermediate or final) are specified with `dvc add` and `dvc run`, | ||
among other commands. This allows DVC to restore one or more pipelines of stages | ||
interconnected by their dependencies and outputs later. (See `dvc repro`.) | ||
|
||
> DVC builds a dependency graph | ||
> ([DAG](https://en.wikipedia.org/wiki/Directed_acyclic_graph)) to do this. | ||
`dvc dag` displays the stages of a pipeline up to the target stage. If `target` | ||
is omitted, it will show the full project DAG. | ||
|
||
## Options | ||
|
||
- `--dot` - show DAG in | ||
[DOT](<https://en.wikipedia.org/wiki/DOT_(graph_description_language)>) | ||
format. It can be passed to third party visualization utilities. | ||
|
||
- `--full` - show full DAG that the `target` belongs too, instead of showing the | ||
part that consists only of the target ancestors. | ||
|
||
- `-h`, `--help` - prints the usage/help message, and exit. | ||
|
||
- `-q`, `--quiet` - do not write anything to standard output. Exit with 0 if no | ||
problems arise, otherwise 1. | ||
|
||
- `-v`, `--verbose` - displays detailed tracing information. | ||
|
||
## Paging the output | ||
|
||
This command's output is automatically piped to | ||
[Less](<https://en.wikipedia.org/wiki/Less_(Unix)>), if available in the | ||
terminal. (The exact command used is `less --chop-long-lines --clear-screen`.) | ||
If `less` is not available (e.g. on Windows), the output is simply printed out. | ||
|
||
> It's also possible to | ||
> [enable Less paging on Windows](/doc/user-guide/running-dvc-on-windows#enabling-paging-with-less). | ||
### Providing a custom pager | ||
|
||
It's possible to override the default pager via the `DVC_PAGER` environment | ||
variable. For example, the following command will replace the default pager with | ||
[`more`](<https://en.wikipedia.org/wiki/More_(command)>), for a single run: | ||
|
||
```dvc | ||
$ DVC_PAGER=more dvc dag | ||
``` | ||
|
||
For a persistent change, define `DVC_PAGER` in the shell configuration. For | ||
example in Bash, we could add the following line to `~/.bashrc`: | ||
|
||
```bash | ||
export DVC_PAGER=more | ||
``` | ||
|
||
## Examples | ||
|
||
Visualize DVC pipeline: | ||
|
||
```dvc | ||
$ dvc dag | ||
+---------+ | ||
| prepare | | ||
+---------+ | ||
* | ||
* | ||
* | ||
+-----------+ | ||
| featurize | | ||
+-----------+ | ||
** ** | ||
** * | ||
* ** | ||
+-------+ * | ||
| train | ** | ||
+-------+ * | ||
** ** | ||
** ** | ||
* * | ||
+----------+ | ||
| evaluate | | ||
+----------+ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.