Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrics: 1.0 update #1360

Merged
merged 11 commits into from
Jun 1, 2020
3 changes: 0 additions & 3 deletions config/prismjs/dvc-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ module.exports = [
'pipeline',
'move',
'metrics show',
'metrics remove',
'metrics modify',
'metrics diff',
'metrics add',
'metrics',
'params diff',
'params',
Expand Down
115 changes: 0 additions & 115 deletions content/docs/command-reference/metrics/add.md

This file was deleted.

38 changes: 15 additions & 23 deletions content/docs/command-reference/metrics/diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ commits in the <abbr>DVC repository</abbr>, or between a commit and the
## Synopsis

```usage
usage: dvc metrics diff [-h] [-q | -v]
[--targets [<path> [<path> ...]]]
[-t <type>] [-x <path>] [-R] [--all]
[--show-json] [--show-md] [a_ref] [b_ref]
usage: dvc metrics diff [-h] [-q | -v] [--targets [<paths> [<paths> ...]]]
[-R] [--all] [--show-json] [--show-md] [--no-path]
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
[--old] [a_rev] [b_rev]

positional arguments:
a_rev Old Git commit to compare (defaults to HEAD)
Expand All @@ -21,10 +20,9 @@ positional arguments:
## Description

This command provides a quick way to compare metrics among experiments in the
repository history. Requires that Git is being used to version the project
metrics.
repository history. It requires that Git is being used to version the metrics.

> Metrics can be defined with `dvc metrics add`, ot the `-m` and `-M` options of
> Metrics can be defined with the `-m` (`--metrics`) and `-M` options of
> `dvc run`.

Run without arguments, this command compares metrics currently present in the
Expand All @@ -37,6 +35,9 @@ They're calculated between two commits (hash, branch, tag, or any
<abbr>project</abbr>, found by examining all of the
[DVC-files](/doc/user-guide/dvc-file-format) in both references.

Another way to display metrics is the `dvc metrics show` command, which just
lists all the current metrics without comparisons.

## Options

- `--targets <paths>` - limit the comparison to these specific metric files.
Expand All @@ -45,28 +46,19 @@ They're calculated between two commits (hash, branch, tag, or any
target directory and its subdirectories for DVC-files to inspect. If there are
no directories among the `targets`, this option is ignored.

- `-t <type>`, `--type <type>` - specify a type of the metric file. Accepted
values are: `json`. It will be saved into the corresponding DVC-file, and used
to determine how to handle displaying metrics. See `dvc metrics show` for more
details.

This option will override any `type` and `xpath` values defined in the
corresponding DVC-file. If no `type` is provided or found in the DVC-file, DVC
will try to detect it based on file extension.

- `-x <path>`, `--xpath <path>` - specify a path within a metric file to show
changes for a specific metric value only. Should be used if the metric file
contains multiple numbers and you want to use only one of them. Only a single
path is allowed. It will override `xpath` defined in the corresponding
DVC-file. See `dvc metrics show` for more details.

- `--all` - list all metrics, even those without changes.

- `--show-json` - prints the command's output in easily parsable JSON format,
instead of a human-readable table.

- `--show-md` - prints the command's output in Markdown table format.

- `--old` - Show old metric value in addition to the new value.
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

- `--no-path` - Don't show metric path in the result table. This option is
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
useful when only one metrics file is in use or there is no intersection
between the metrics names.
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

- `-h`, `--help` - prints the usage/help message, and exit.

- `-q`, `--quiet` - do not write anything to standard output. Exit with 0 if no
Expand All @@ -80,7 +72,7 @@ Start by creating a simple metrics file and commit it:

```dvc
$ dvc run -M metrics.json \
'echo {\"AUC\": 0.9643, \"TP\": 527} > metrics.json'
'echo {\"AUC\": 0.9643, \"TP\": 527} > metrics.json'
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
$ git add metrics.json metrics.json.dvc
$ git commit -m "Add metrics file"
```
Expand Down
Loading