在 GitHub 上编辑
Live.make_dvcyaml()
将指标、图表和参数的 DVC 配置 写入 Live.dvc_file。
def make_dvcyaml()用法
from dvclive import Live
live = Live()
live.log_param("lr", 0.01)
live.log_metric("acc", 0.9)
live.log_sklearn_plot("confusion_matrix", [0, 0, 1, 1], [1, 0, 0, 1])
live.make_dvcyaml()描述
创建 dvc.yaml 文件,用于描述和配置指标、图表与参数。DVC 工具使用此文件来展示报告和实验表格。
Live.next_step() 和 Live.end() 会内部自动调用 Live.make_dvcyaml(),因此你无需手动调用二者(除非设置 dvcyaml=None)。
params:
- dvclive/params.yaml
metrics:
- dvclive/metrics.json
plots:
- dvclive/plots/metrics
- dvclive/plots/sklearn/confusion_matrix.json:
template: confusion
x: actual
y: predicted
title: Confusion Matrix
x_label: True Label
y_label: Predicted Label