Edit on GitHub

stage list

List stages in the project.

Synopsis

usage: dvc stage list [-h] [-q | -v]
                      [-R] [--all] [--fail] [--names-only]
                      [targets ...]

positional arguments:
  targets          Show stages from a dvc.yaml file or a directory (with -R).
                   'dvc.yaml' by default.

Description

dvc stage list is useful for quick listing of stages present in the project without having to open dvc.yaml files.

It provides a list of stages, with a stage name and the description of the stage. The description of the stage is read from desc field in the dvc.yaml file, or if it does not exist, DVC generates the short description from the other metadata it has about the stage.

Without any targets, by default, it only lists the stages from the dvc.yaml present in the current working directory.

DVC also uses this command to provide autocompletion in bash and zsh.

Options

  • targets (optional command argument) - stages to list from (./dvc.yaml by default). Different things can be provided as targets depending on the flags used (more details in each option). Examples:

  • -R, --recursive - looks for dvc.yaml files to list from in any directories given as targets, and in their subdirectories. If there are no directories among the targets, this option has no effect.
  • --all - lists all of the stages from all dvc.yaml files in the repo, regardless of the targets.
  • --fail - fails immediately if any dvc.yaml files have syntax errors. By default, those errors are skipped. This option is only in effect if --all or -R is used.
  • --names-only - only lists the name of the stages. It can be useful for scripting purposes. DVC uses it for providing autocompletion on bash.
  • -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.

Example: List stages

Listing stages from the default ./dvc.yaml file from the repo.

$ dvc stage list
prepare    Outputs data/prepared
featurize  Outputs data/features
train      Outputs model.pkl
evaluate   Reports scores.json, prc.json, roc.json
Content

๐Ÿ› Found an issue? Let us know! Or fix it:

Edit on GitHub

โ“ Have a question? Join our chat, we will help you:

Discord Chat