Skip to main content

Description

DVC params commands help you track and compare parameters (hyperparameters, configuration values) across different experiments and commits. Parameters are typically stored in YAML, JSON, TOML, or Python files and define model training configurations.

Subcommands

params diff

Show changes in params between commits in the DVC repository, or between a commit and the workspace.

Arguments

string
default:"HEAD"
Old Git commit to compare (defaults to HEAD).
string
default:"workspace"
New Git commit to compare (defaults to the current workspace).

Options

list
Specific params file(s) to compare (even if not found as params in dvc.yaml). Shows all tracked params by default.
flag
Show unchanged params as well.
flag
Show only params that are stage dependencies.
flag
Show output in JSON format.
flag
Show tabulated output in the Markdown format (GFM).
flag
Don’t show params path.

Examples

Basic Parameter Comparison

Compare Specific Files

This compares only the specified parameter files.

Show Only Changed Parameters (Default)

Shows parameters that changed in the last 3 commits.

Include Unchanged Parameters

JSON Output for Automation

Use --json output with tools like jq for automated parameter validation in CI/CD pipelines.

Show Only Stage Dependencies

Filters to show only parameters that are declared as dependencies in pipeline stages.
The --deps flag is useful when you have many parameters but only want to see those that affect pipeline execution.

Parameter File Formats

DVC supports multiple parameter file formats:
params.yaml
params.json
params.toml
params.py

Use Cases

Hyperparameter Tracking

Track how hyperparameters change across experiments and their impact on metrics.

Experiment Comparison

Compare parameter configurations between different experiment runs.

Reproducibility

Ensure exact parameter values are recorded for reproducing results.

Configuration Management

Manage different configurations for development, staging, and production.
Parameters must be tracked in dvc.yaml or passed explicitly via --targets to be compared.
  • dvc metrics - Compare metrics across experiments
  • dvc plots - Visualize how parameters affect outcomes
  • dvc exp show - Show both params and metrics together