Open daavoo opened 2 years ago
What's the advantage of --json | jq <filter> > vega.json
over --show-vega > vega.json
when we still need to use vl2png
anyway?
If we could do something like --json | python -c 'import matplotlib.pyplot as plt, sys; plt.plot(eval(sys.stdin.read())["classes.csv"][0])'
instead that would be nice
What's the advantage of
--json | jq <filter> > vega.json
over--show-vega > vega.json
when we still need to usevl2png
anyway?
We can use --show-vega
for this example, as long as the flag is not removed 😅.
One difference is that --show-vega
only works for a single plot whereas --json
can return the list of all plots for a rev. So, jq
could be used to do a for loop calling vl2png
and cml send-comment
. It would be handy for dvclive plots.
Another thing is that --show-vega
doesn't return image plots. --json
could be used to combine image plots and cml publish
.
If we could do something like
--json | python -c 'import matplotlib.pyplot as plt, sys; plt.plot(eval(sys.stdin.read())["classes.csv"][0])'
instead that would be nice
What would be the advantage over jq
?
What would be the advantage over
jq
?
You mean "what would be the advantage of --json | python -c '...'
over --json | jq <filter> > vega.json && vl2png ...
?"
No reliance on vl2png
nor jq
.
Note that this hasn't been released yet but it's merged on master:
I think
send-comment
with vega plot is a widely used exampleOriginally posted by @daavoo in https://github.com/iterative/dvc/issues/7093#issuecomment-998095565