Introduzione al versionamento dei dati con DVC
Ravi Bhadauria
Machine Learning Engineer
outsstages:
train_and_evaluate:
outs:
- metrics.json
- plots.png
$$ $$
metricsstages:
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: # Nome del file con le predizioni template: confusion # Stile del graficox: predicted_label # Nome colonna X nel file csv y: true_label # Nome colonna Y nel file csv x_label: 'Predicted label' y_label: 'True label' title: Confusion matrixcache: false # Salva in Git
$ dvc plots show predictions.csv
file:///path/to/index.html

# confronta il grafico in predictions.csv con il branch main
$ dvc plots diff --target predictions.csv <branch name or commit SHA>

Introduzione al versionamento dei dati con DVC