Skip to content

Commit

Permalink
cmd ref: more updates on new dag command (#1496)
Browse files Browse the repository at this point in the history
* cmd ref: more updates on new dag command
per #1383 (review)
et al.

* Update content/docs/command-reference/dag.md

Co-authored-by: Ruslan Kuprieiev <[email protected]>

* cmd: a few more impros to dag
per #1496 (review)
and #1496 (review)

* cmd: graph -> DAG{linked} in dag intro
per #1496 (review)

* cmd: DAGs -> graph(s) in dag intro
per #1496 (comment)

Co-authored-by: Ruslan Kuprieiev <[email protected]>
  • Loading branch information
jorgeorpinel and efiop authored Jun 26, 2020
1 parent 8564ae8 commit b87679a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
35 changes: 18 additions & 17 deletions content/docs/command-reference/dag.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
# 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).
Visualize the pipeline(s) in
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvclock-file) as one or
more graph(s) of connected [stages](/doc/command-reference/run).

## 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.
target Stage or output to show pipeline for (optional)
Uses 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).
data, and has a final result.

Data processing or 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`.)
results (intermediate or final) are specified in `dvc.yaml`, which can be
written manually or built using the helper command `dvc run`. This allows DVC to
restore one or more pipelines 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.
`dvc dag` command displays the stages of a pipeline up to the target stage. If
`target` is omitted, it will show the full project DAG.

## Options

- `--full` - show full DAG that the `target` stage belongs too, instead of
showing only its ancestors.

- `--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
Expand Down
1 change: 0 additions & 1 deletion content/docs/command-reference/push.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ a [pipeline](/doc/command-reference/pipeline) has been setup with these

```dvc
$ dvc pipeline show
data/Posts.xml.zip.dvc
Posts.xml.dvc
Posts.tsv.dvc
Expand Down
4 changes: 2 additions & 2 deletions content/docs/user-guide/running-dvc-on-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ directory, as explained in
## Enabling paging with `less`

By default, DVC tries to use [Less](<https://en.wikipedia.org/wiki/Less_(Unix)>)
as pager for the output of `dvc dag`. Windows doesn't have the less command
available however. Fortunately, there is a easy way of installing `less` via
as pager for the output of `dvc dag`. Windows doesn't have the `less` command
available however. Fortunately, there is a easy way of installing it via
[Chocolatey](https://chocolatey.org/) (please install the tool first):

```dvc
Expand Down
4 changes: 2 additions & 2 deletions redirects-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"^/doc/understanding-dvc(/.*)?$ /doc/user-guide/what-is-dvc",
"^/doc/commands-reference(/.*)?$ /doc/command-reference$1",
"^/doc/command-reference/plot$ /doc/command-reference/plots",
"^/doc/command-reference/lock$ /doc/command-reference/freeze",
"^/doc/command-reference/unlock$ /doc/command-reference/unfreeze",
"^/doc/command-reference/pipeline$ /doc/command-reference/dag",
"^/doc/command-reference/pipeline/show$ /doc/command-reference/dag",
"^/doc/command-reference/pipeline/list$ /doc/command-reference/dag",
"^/doc/command-reference/lock$ /doc/command-reference/freeze",
"^/doc/command-reference/unlock$ /doc/command-reference/unfreeze",

"^/(.+)/$ /$1"
]

0 comments on commit b87679a

Please sign in to comment.