DVC로 배우는 데이터 버저닝 입문
Ravi Bhadauria
Machine Learning Engineer
outs에서 변경stages:
train_and_evaluate:
outs:
- metrics.json
- plots.png
$$ $$
metrics로 변경stages:
train_and_evaluate:
outs:
- plots.png
metrics:
- metrics.json:
cache: false
$ dvc metrics show
Path accuracy f1_score precision recall
metrics.json 0.947 0.8656 0.988 0.7702
dvc repro 재실행$ dvc metrics diff
Path Metric HEAD workspace Change
metrics.json accuracy 0.947 0.9995 0.0525
metrics.json f1_score 0.8656 0.9989 0.1333
metrics.json precision 0.988 0.9993 0.0113
metrics.json recall 0.7702 0.9986 0.2284
stages: train_and_evaluate: ... plots: - predictions.csv: # 예측이 담긴 파일명 template: confusion # 플롯 스타일x: predicted_label # CSV의 X축 열 이름 y: true_label # CSV의 Y축 열 이름 x_label: 'Predicted label' y_label: 'True label' title: Confusion matrixcache: false # Git에 저장
$ dvc plots show predictions.csv
file:///path/to/index.html

# predictions.csv 플롯을 브랜치 main과 비교
$ dvc plots diff --target predictions.csv <branch name or commit SHA>

DVC로 배우는 데이터 버저닝 입문