Description
DVC metrics commands help you track, display, and compare machine learning metrics across different experiments, commits, branches, and tags. Metrics are numerical values that measure model performance (e.g., accuracy, loss, precision).Subcommands
metrics show
Print metrics with optional formatting.Arguments
Limit command scope to these metrics files. Using
-R, directories to search metrics files in can also be given.Options
Show metrics for all branches.
Show metrics for all tags.
Show metrics for all commits.
Show output in JSON format.
Show tabulated output in the Markdown format (GFM).
If any target is a directory, recursively search and process metrics files.
Round metrics to
n digits precision after the decimal point. Rounds to 5 digits by default.Example Output
metrics diff
Show changes in metrics between commits in the DVC repository, or between a commit and the workspace.Arguments
Old Git commit to compare (defaults to HEAD).
New Git commit to compare (defaults to the current workspace).
Options
Specific metrics file(s) to compare (even if not found as
metrics in dvc.yaml). Using -R, directories to search metrics files in can also be given. Shows all tracked metrics by default.If any target is a directory, recursively search and process metrics files.
Show unchanged metrics as well.
Show output in JSON format.
Show tabulated output in the Markdown format (GFM).
Don’t show metric path.
Round metrics to
n digits precision after the decimal point. Rounds to 5 digits by default.Example Output
By default, only changed metrics are shown. Use
--all to see unchanged metrics.Use Cases
Track Model Performance
Monitor how your model metrics change across experiments and iterations.
Compare Branches
Evaluate metric differences between feature branches and main branch.
A/B Testing
Compare different model architectures or hyperparameter configurations.
CI/CD Integration
Automate metric reporting in continuous integration pipelines with
--json output.Related Commands
dvc params- Compare parameters across experimentsdvc plots- Visualize metrics as plotsdvc exp show- Show metrics for experiments