vscode-dvc: `smooth` plots template broken
The smooth
plots template is broken and doesn’t seem to account for the groupby, instead collapsing everything into one line.
To reproduce, you can use https://github.com/iterative/example-get-started and change the template in dvc.yaml
for one of the linear plots to smooth
:
$ git diff
diff --git a/dvc.yaml b/dvc.yaml
index 684eb69..9b34875 100644
--- a/dvc.yaml
+++ b/dvc.yaml
@@ -52,6 +52,7 @@ plots:
y:
eval/prc/train.json: precision
eval/prc/test.json: precision
+ template: smooth
- ROC:
x: fpr
y:
The smooth template is on the left below, and it should have two lines (the right plot also doesn’t look great, but that should be fixable on the DVC side):

About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (15 by maintainers)
For now, they have to be concatenated, I’m looking into options to keep them apart. That’s how the Vega template looks like in VS Code (anyone can copy paste and play with it here):
A pretty large JSON
(I modified and put
filename::field
into groupby to make it work).VS Code adds this section (besides modifying the data points a bit with an additional field
filename::field
):This section is needed to:
I can’t easily at the moment come up with an alternative, but I’m pretty sure we can do something here. I don’t like that we have to grow the list of things that go through group by. And unfortunately, it seems we can’t group by by the whole
dvc_data_version_info
object 😦