Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dvc.yaml top level plot snippets #4234

Merged
merged 2 commits into from
Jul 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions extension/snippets/dvc-yaml.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,61 @@
" - \\${item}.${5:suffix for the templated output file, e.g. pkl}"
],
"description": "Foreach stage template for dvc.yaml pipeline"
},
"Single File Plot Template": {
"prefix": "dvc-plot-single",
"body": [
" - ${1:file, e.g. probs.json}:",
" template: ${2|linear,simple,scatter,smooth,confusion,confusion_normalized,bar_horizontal,bar_horizontal_sorted|}",
" x: ${3:x values, e.g. actual}",
" y: ${4: y values, e.g. predicted}",
" title: ${5:title, e.g. Predicted Probabilities}"
],
"description": "Single file dvc.yaml top level plot template"
},
"Multi-file Plot Template": {
"prefix": "dvc-plot-multi",
"body": [
" - ${1:name, e.g. Accuracy}:",
" template: ${2|linear,simple,scatter,smooth,confusion,confusion_normalized,bar_horizontal,bar_horizontal_sorted|}",
" x: ${3:x values, e.g. step}",
" y: ",
" ${4:file, e.g. training/plots/metrics/train/acc.tsv}: ${5:y values, e.g. acc}",
" ${6:file, e.g. training/plots/metrics/test/acc.tsv}: ${7:y values, e.g. acc}",
" y_label: ${8:y label, e.g. accuracy}"
],
"description": "Multi-file dvc.yaml top level plot template"
},
"Bar Horizontal Plot Template": {
"prefix": "dvc-plot-bar-horizontal",
"body": [
" - ${1:file, e.g. hist.csv}:",
" template: bar_horizontal",
" x: ${2:x values, e.g. preds}",
" y: ${3: y values, e.g. digit}",
" title: ${4:title, e.g. Histogram of Predictions}"
],
"description": "Bar horizontal dvc.yaml top level plot template"
},
"Confusion Matrix Plot Template": {
"prefix": "dvc-plot-confusion",
"body": [
" - ${1:name, e.g. Confusion Matrix}:",
" template: confusion",
" x: ${2:x values, e.g. actual}",
" y:",
" ${3:file, e.g. training/plots/sklearn/confusion_matrix.json}: ${4:y values, e.g. predicted}"
],
"description": "Confusion matrix dvc.yaml top level plot template"
},
"Smooth Plot Template": {
"prefix": "dvc-plot-smooth",
"body": [
" - ${1:file, e.g. acc.tsv}:",
" x: ${2:x values, e.g. step}",
" y: ${3: y values, e.g. acc}",
" y_label: ${4: y label, e.g. accuracy}"
],
"description": "Smooth dvc.yaml top level plot template"
}
}