Edit on GitHub

exp show

Print a customizable table of dvc experiments, their metrics and parameters.

Press q to exit.

Synopsis

usage: dvc exp show [-h] [-q | -v] [-a] [-T] [-A] [-n <num>]
                    [--no-pager] [--include-metrics <metrics_list>]
                    [--exclude-metrics <metrics_list>]
                    [--include-params <params_list>]
                    [--exclude-params <params_list>] [--param-deps]
                    [--sort-by <metric/param>]
                    [--sort-order {asc,desc}] [--no-timestamp] [--sha]
                    [--show-json] [--precision <n>]

Description

Displays experiments and checkpoints in a detailed table which includes their parent and name (or hash), as well as project metrics and parameters. Only the experiments derived from the Git HEAD are shown by default but all experiments can be included with the --all-commits option. Example:

$ dvc exp show
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Experiment    ┃ avg_prec ┃ roc_auc ┃ train.n_est┃ train.min_split ┃
┑━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩
β”‚ workspace     β”‚  0.56191 β”‚ 0.93345 β”‚ 50         β”‚ 2               β”‚
β”‚ master        β”‚  0.55259 β”‚ 0.91536 β”‚ 50         β”‚ 2               β”‚
β”‚ β”œβ”€β”€ exp-bfe64 β”‚  0.57833 β”‚ 0.95555 β”‚ 50         β”‚ 8               β”‚
β”‚ └── exp-ad5b1 β”‚  0.56191 β”‚ 0.93345 β”‚ 50         β”‚ 2               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Your terminal will enter a paginated screen by default, which you can typically exit by typing Q. Use --no-pager to print the table to standard output.

By default, the printed experiments table will include columns for all metrics and params from the entire project. The --param-deps, --include-metrics, and other options can determine which ones should be displayed.

Experiments in the table are first grouped (by parent commit). They are then sorted inside each group, chronologically by default. The --sort-by and --sort-order options can change this ordering, based on any single, visible metric or param.

Options

  • -a, --all-branches - include experiments derived from all Git branches, as well as from the last commit (HEAD). Note that this can be combined with -T below, for example using the -aT flags.
  • -T, --all-tags - include experiments derived from all Git tags, as well as from the last commit. Note that this can be combined with -a above, for example using the -aT flags.
  • -A, --all-commits - include experiments derived from all Git commits, as well as from the last one. This prints all experiments in the project.
  • -n <num>, --num <num> - show the last num commits from HEAD.
  • --no-pager - do not enter the pager screen. Writes the entire table to standard output. Useful to redirect the output to a file, or use your own paginator.
  • --param-deps - include only parameters that are stage dependencies.
  • --include-params <list> - show the specified dvc params in the table only. Accepts a comma-separated list of param names. Shell style wildcards supported: *, ?, [seq], [!seq], and ** If a path: prefix is included in the name, the wildcard pattern will not be matched against that prefix but only against the rest of the name.
  • --exclude-params <list> - hide the specified dvc params from the table (all param will be shown except for these). Accepts a comma-separated list of param names. Shell style wildcards supported: *, ?, [seq], [!seq], and ** If a path: prefix is included in the name, the wildcard pattern will not be matched against that prefix but only against the rest of the name.
  • --include-metrics <list> - show the specified dvc metrics in the table only. Accepts a comma-separated list of metric names. Shell style wildcards supported: *, ?, [seq], [!seq], and **. If a path: prefix is included in the name, the wildcard pattern will not be matched against that prefix but only against the rest of the name.
  • --exclude-metrics <list> - hide the specified dvc metrics from the table (all param will be shown except for these). Accepts a comma-separated list of metric names. Shell style wildcards supported: *, ?, [seq], [!seq], and **. If a path: prefix is included in the name, the wildcard pattern will not be matched against that prefix but only against the rest of the name.
  • --sort-by <name> - sort experiments by the specified metric or param (name). Only one visible column (either metric or param) can be used for sorting. This only affects the ordering of experiments derived from the same parent commit. Parent commits are always sorted chronologically.
  • --sort-order {asc,desc} - sort order to use with --sort-by (defaults to descending).
  • --no-timestamp - do not show experiment timestamps.
  • --sha - display Git commit (SHA) hashes instead of branch, tag, or experiment names.
  • --show-json - prints the command's output in easily parsable JSON format, instead of a human-readable table.
  • --precision <n> - round decimal values to n digits of precision (5 by default). Applies to metrics only.
  • -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.

Examples

This example is based on our Get Started, where you can find the actual source code.

Let's say we have run 3 experiments in our project. The basic usage shows the workspace (Git working tree) and experiments derived from HEAD (10-bigrams-experiment branch in this case), and all of their metrics and params (scroll right to see all):

$ dvc exp show
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Experiment            ┃ Created      ┃     auc ┃ featurize.max_fea… ┃ featurize.ngrams ┃ prepare.seed ┃ prepare.split ┃ train.n_estimators ┃ train.seed ┃
┑━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
β”‚ workspace             β”‚ -            β”‚ 0.61314 β”‚ 1500               β”‚ 2                β”‚ 20170428     β”‚ 0.2           β”‚ 50                 β”‚ 20170428   β”‚
β”‚ 10-bigrams-experiment β”‚ Jun 20, 2020 β”‚ 0.61314 β”‚ 1500               β”‚ 2                β”‚ 20170428     β”‚ 0.2           β”‚ 50                 β”‚ 20170428   β”‚
β”‚ β”œβ”€β”€ exp-e6c97         β”‚ Oct 21, 2020 β”‚ 0.61314 β”‚ 1500               β”‚ 2                β”‚ 20170428     β”‚ 0.2           β”‚ 50                 β”‚ 20170428   β”‚
β”‚ β”œβ”€β”€ exp-1dad0         β”‚ Oct 09, 2020 β”‚ 0.57756 β”‚ 2000               β”‚ 2                β”‚ 20170428     β”‚ 0.2           β”‚ 50                 β”‚ 20170428   β”‚
β”‚ └── exp-1df77         β”‚ Oct 09, 2020 β”‚ 0.51676 β”‚ 500                β”‚ 2                β”‚ 20170428     β”‚ 0.2           β”‚ 50                 β”‚ 20170428   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

You can exit this screen with Q, typically.

Let's limit the param columns to only include the featurize group:

$ dvc exp show --include-params=featurize
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ Experiment            ┃ Created      ┃     auc ┃ featurize.max_features ┃ featurize.ngrams ┃
┑━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
β”‚ workspace             β”‚ -            β”‚ 0.61314 β”‚ 1500                   β”‚ 2                β”‚
β”‚ 10-bigrams-experiment β”‚ Jun 20, 2020 β”‚ 0.61314 β”‚ 1500                   β”‚ 2                β”‚
β”‚ β”œβ”€β”€ exp-e6c97         β”‚ Oct 21, 2020 β”‚ 0.61314 β”‚ 1500                   β”‚ 2                β”‚
β”‚ β”œβ”€β”€ exp-1dad0         β”‚ Oct 09, 2020 β”‚ 0.57756 β”‚ 2000                   β”‚ 2                β”‚
β”‚ └── exp-1df77         β”‚ Oct 09, 2020 β”‚ 0.51676 β”‚ 500                    β”‚ 2                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Sort experiments by the auc metric, in ascending order:

$ dvc exp show --include-params=featurize --sort-by=auc --sort-order=asc
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ Experiment            ┃ Created      ┃     auc ┃ featurize.max_features ┃ featurize.ngrams ┃
┑━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
β”‚ workspace             β”‚ -            β”‚ 0.61314 β”‚ 1500                   β”‚ 2                β”‚
β”‚ 10-bigrams-experiment β”‚ Jun 20, 2020 β”‚ 0.61314 β”‚ 1500                   β”‚ 2                β”‚
β”‚ β”œβ”€β”€ exp-1df77         β”‚ Oct 09, 2020 β”‚ 0.51676 β”‚ 500                    β”‚ 2                β”‚
β”‚ β”œβ”€β”€ exp-1dad0         β”‚ Oct 09, 2020 β”‚ 0.57756 β”‚ 2000                   β”‚ 2                β”‚
β”‚ └── exp-e6c97         β”‚ Oct 21, 2020 β”‚ 0.61314 β”‚ 1500                   β”‚ 2                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

To see all experiments throughout the Git history:

$ dvc exp show --all-commits --include-params=featurize --sort-by=auc --sort-order=asc
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ Experiment            ┃ Created      ┃     auc ┃ featurize.max_features ┃ featurize.ngrams ┃
┑━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
β”‚ workspace             β”‚ -            β”‚ 0.61314 β”‚ 1500                   β”‚ 2                β”‚
β”‚ 10-bigrams-experiment β”‚ Jun 20, 2020 β”‚ 0.61314 β”‚ 1500                   β”‚ 2                β”‚
β”‚ β”œβ”€β”€ exp-1df77         β”‚ Oct 09, 2020 β”‚ 0.51676 β”‚ 500                    β”‚ 2                β”‚
β”‚ β”œβ”€β”€ exp-1dad0         β”‚ Oct 09, 2020 β”‚ 0.57756 β”‚ 2000                   β”‚ 2                β”‚
β”‚ └── exp-e6c97         β”‚ Oct 21, 2020 β”‚ 0.61314 β”‚ 1500                   β”‚ 2                β”‚
β”‚ 10-bigrams-model      β”‚ Jun 20, 2020 β”‚ 0.54175 β”‚ 1500                   β”‚ 2                β”‚
β”‚ └── exp-069d9         β”‚ Sep 24, 2020 β”‚ 0.51076 β”‚ 2500                   β”‚ 2                β”‚
β”‚ 9-evaluation          β”‚ Jun 20, 2020 β”‚ 0.54175 β”‚ 500                    β”‚ 1                β”‚
β”‚ 8-ml-pipeline         β”‚ Jun 20, 2020 β”‚       - β”‚ 500                    β”‚ 1                β”‚
β”‚ 6-prep-stage          β”‚ Jun 20, 2020 β”‚       - β”‚ 500                    β”‚ 1                β”‚
β”‚ 5-source-code         β”‚ Jun 20, 2020 β”‚       - β”‚ 500                    β”‚ 1                β”‚
β”‚ 4-import-data         β”‚ Jun 20, 2020 β”‚       - β”‚ 1500                   β”‚ 2                β”‚
β”‚ 2-track-data          β”‚ Jun 20, 2020 β”‚       - β”‚ 1500                   β”‚ 2                β”‚
β”‚ 3-config-remote       β”‚ Jun 20, 2020 β”‚       - β”‚ 1500                   β”‚ 2                β”‚
β”‚ 1-dvc-init            β”‚ Jun 20, 2020 β”‚       - β”‚ 1500                   β”‚ 2                β”‚
β”‚ 0-git-init            β”‚ Jun 20, 2020 β”‚       - β”‚ 1500                   β”‚ 2                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Note that in the final example, Git commits remain in chronological order. The sorting only applies to experiment groups (sharing a parent commit).

πŸ“– See Metrics, Parameters, and Plots for an introduction to parameters, metrics, plots.

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