metrics-params-plots
Track, compare, inspect, and troubleshoot DVC metrics, params, and plots from CLI, dvc.yaml, and the public Python API.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- metrics-params-plots
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Track, compare, inspect, and troubleshoot DVC metrics, params, and plots from CLI, dvc.yaml, and the public Python API.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md5.3 KB
- 参考文档references/data-formats.md6.0 KB
- 参考文档references/troubleshooting.md8.0 KB
- 参考文档references/workflows.md7.3 KB
- 脚本scripts/summarize_metrics_params.py5.4 KB
03 SKILL.md 正文
DVC Metrics, Params, and Plots
Use this sub-skill when a task is about declaring, showing, diffing, comparing, exporting, or debugging DVC metrics, params, or plots. It covers CLI reporting, dvc.yaml declarations, plot configuration, and the public dvc.api.metrics_show() / dvc.api.params_show() helpers.
Route Here For
- Metrics:
dvc metrics show,dvc metrics diff, metric declarations indvc.yaml,-m,-M, JSON/Markdown output, revision comparison, and precision behavior. - Params:
dvc params diff, params dependencies indvc.yaml,dvc stage add -p, multiple params files, stage-scoped params,--deps, JSON/Markdown output, and Python API inspection. - Plots:
dvc plots show,dvc plots diff,dvc plots modify,dvc plots templates, top-levelplots:definitions, stage plot outputs, Vega/HTML output, CSV/TSV header behavior, image plots, and plot templates. - Python API:
dvc.api.metrics_show()anddvc.api.params_show()for safe JSON-friendly summaries from scripts or notebooks.
Route Elsewhere
- Use
../data-and-pipelines/SKILL.mdfor stage construction basics,dvc init,dvc add,dvc repro,dvc status, dependencies, outputs, and cache lifecycle outside metrics/plots declarations. - Use
../experiments/SKILL.mdfordvc exp show, experiment tables, experiment queueing/runs, experiment comparison semantics, and experiment-specific interpretation of metrics/params. - Use remote/cache guidance when metrics or plots cannot be read because data cache objects are missing locally and must be fetched.
Quick Decision Pattern
- If the user wants machine-readable reporting, prefer
--jsonfor CLI commands or the bundledscripts/summarize_metrics_params.pyhelper. - If metrics or params should be generated by a pipeline, declare them on the stage (
-m,-M,--plots,--plots-no-cache, and-p) before runningdvc repro. - If the task compares revisions, use
dvc metrics diffordvc params diff; for plots, usedvc plots diffand add--json/--show-vegawhen browser output is not acceptable. - If params are unexpected, inspect both the stage params dependency declarations and the API flattening behavior for duplicate keys across files.
- If plots fail, check data format, headers,
x/yfields, template names, and whether the plot target is a stage output or a top-levelplots:definition.
Common Commands
dvc metrics show --json --precision 4
dvc metrics diff HEAD workspace --json --precision 4
dvc params diff HEAD workspace --targets params.yaml --deps --json
dvc plots show reports/metrics.tsv --json --show-vega -x step -y accuracy --out dvc_plots
dvc plots diff HEAD workspace --targets reports/metrics.tsv --json --out dvc_plots
This checkout exposes dvc params diff in the CLI and exposes param display through dvc.api.params_show(). Do not promise a dvc params show CLI subcommand unless dvc params --help in the target environment lists it.
Bundled References
references/workflows.mdgives CLI anddvc.yamlrecipes for metrics, params, and plots.references/api-reference.mddocuments verified public API signatures, return shapes, duplicate-key behavior, and helper usage.references/data-formats.mdexplains supported metrics/params/plots data formats, top-level plot definitions, andplotsconfig keys.references/troubleshooting.mdmaps empty output, duplicate keys, path mistakes, format precision, and malformed files to concrete checks.scripts/summarize_metrics_params.pysafely calls the public API and prints JSON without running pipeline commands or opening browsers.
Safe Helper
From this sub-skill directory, run:
python scripts/summarize_metrics_params.py --repo /path/to/project --rev HEAD --metrics-target reports/metrics.json --params-target params.yaml --stage train --deps
The helper imports dvc.api, calls only read-style API functions, emits JSON, and converts no-data/no-repo/API exceptions into explicit result objects.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).