metrics & plots: help output improvements#3963
Conversation
|
Few param names in docs are outdated: |
| "--targets", | ||
| nargs="*", | ||
| help=( | ||
| "Metric files or directories (see -R) to show diff for. " |
There was a problem hiding this comment.
Actually, in this case -R works, so we should keep it 🙂 But probably need to rephrase it a bit, because it is about directories containing metric files.
There was a problem hiding this comment.
Updated the message. May still be badly phrased though
There was a problem hiding this comment.
I think the new text is accurate (taken from older commands like push/pull). Should we also apply it to metrics show though? I think so!
There was a problem hiding this comment.
Changed text in metrics show. Please, check it out.
| fix_subparsers(plots_subparsers) | ||
|
|
||
| SHOW_HELP = "Generate a plots image file from a metrics file." | ||
| SHOW_HELP = "Generate plot from a metrics file." |
There was a problem hiding this comment.
Actually, it can generate multiple plots from multiple metrics files.
Yes, some of it but maybe this PR will have even more changes so could we maybe restore the PR template with the check boxes so we don't forget to apply the same changes to docs afterwards?
|
| def add_parser(subparsers, parent_parser): | ||
| PLOTS_HELP = ( | ||
| "Generating plots for metrics stored in structured files " | ||
| "Commands to visualize and compare plot metrics in structured files " |
There was a problem hiding this comment.
Thanks for this change. We may be changing it further per this treeverse/dvc.org#1382 (comment). Please check the resolution tomorrow or so.
jorgeorpinel
left a comment
There was a problem hiding this comment.
So far so good, thanks! (Just left a couple small notes ☝️).
I'm not opposed to merging but there's a few more things related to metrics output strings we could address here or separately:
- Lots of unnecessary periods in the non-sentence descriptions of command options.
- Similar updates apply to plots modify now that it has been added, also based on https://github.com/iterative/dvc.org/pull/1382/files?file-filters%5B%5D=.md#diff-b6540815158031bd570b61c0cb46c19f but arguable, of course. For example:
PLOTS_MODIFY_HELP = "Modify display properties of plot metric files."targetarg help: `"Metric file to set props to" (no period)- for
--unset:"Unset one or more display properties."
- Additionally, it would be nice to reorder the command parameters to match the order in the Options sections of the corresponding cmd refs (as ordered in #1382)
@jorgeorpinel I added list of required documentation changes into original post. I will create separate PR if treeverse/dvc.org#1382 will be resolved before this one. |
pared
left a comment
There was a problem hiding this comment.
2 comments, I like including metavar.
| "Plot differences in metrics between commits in the DVC " | ||
| "repository, or between the last commit and the workspace." | ||
| ) | ||
| PLOTS_DIFF_HELP = "Plot differences in metrics between commits." |
There was a problem hiding this comment.
I think phrasing here (in original DIFF_HELP too) is a bit off. We never plot differences. Plots exist alongside, either on the same plot (default, scatter) or on separate canvases (confusion matrix).
In the case of metrics, we do diff them by subtracting. Word diff suggests visualizing some kind of difference between metrics, which is not happening in plots.
I am not sure whether we should treat the plot in a similar way we do with metrics.
There was a problem hiding this comment.
@pared but the command is called diff :) A few lines on the same plot could also be considered as diff, that's what we do and why the command is called dvc plots diff. As you've mentioned, we don't really plot all plots in the same image, but rather we show 1 image per 1 plot with multiple lines in it, and that is how we visualise a diff for a particular plot.
| "revisions", | ||
| nargs="*", | ||
| default=None, | ||
| help="Git commits to plot from/to", |
There was a problem hiding this comment.
We do not write plots to commits. I might miss something, why this to?
There was a problem hiding this comment.
That was my fault. Our latest version is
Git commits to find metrics to compare
| "Plot differences in metrics between commits in the DVC " | ||
| "repository, or between the last commit and the workspace." | ||
| "Show multiple versions of plot metrics " | ||
| "by plotting them in a single image." |
There was a problem hiding this comment.
It's not always single image (confusion matrix requires to plot few of them). I think Show multiple versions of plot metircs. Would be fine
There was a problem hiding this comment.
Shame we lost the info about "between commits in the DVC repository, or between the last commit and the workspace." 🙁
There was a problem hiding this comment.
What about "Show multiple versions of plot metrics from different commits"?
There was a problem hiding this comment.
Or we should go back to "Plot differences in metrics between commits in the DVC repository, or between the last commit and the workspace."
There was a problem hiding this comment.
Ok, I guess I caused some confusion here, by reviewing even the base version. @nik123 I am sorry about that. @jorgeorpinel could you take look? In docs, we have:
This command visualize difference between metrics among experiments in the repository history.
That sounds about right.
There was a problem hiding this comment.
@nik123 I am for that, let's ask @jorgeorpinel for the green light.
There was a problem hiding this comment.
@pared But you are the author of this feature. Isn't single image completely wrong?
There was a problem hiding this comment.
It seems we almost have an agreement. @jorgeorpinel what are your thoughts about last proposed text?
There was a problem hiding this comment.
Well, I lost track of this one until now oops, sorry! The text you came up with is good 🙂
# Conflicts: # dvc/command/plots.py
jorgeorpinel
left a comment
There was a problem hiding this comment.
Thanks for the updates @nik123! And sorry for the delay to come back. Here are a few more minor suggestions after a final pass. Probably you could just commit them from GH
| "-o", | ||
| "--out", | ||
| default=None, | ||
| help="Destination path to save plots to.", |
There was a problem hiding this comment.
| help="Destination path to save plots to.", | |
| help="Destination path to save plots to", |
There was a problem hiding this comment.
@jorgeorpinel Is it really worth bothering with dots in this PR? We have dots all over the place, I don't really see a point in blocking this PR just because of it: it makes it even less consistent.
Co-authored-by: Jorge Orpinel <jorgeorpinel@users.noreply.github.com>
Co-authored-by: Jorge Orpinel <jorgeorpinel@users.noreply.github.com>
Co-authored-by: Jorge Orpinel <jorgeorpinel@users.noreply.github.com>
Co-authored-by: Jorge Orpinel <jorgeorpinel@users.noreply.github.com>
Co-authored-by: Jorge Orpinel <jorgeorpinel@users.noreply.github.com>
Co-authored-by: Jorge Orpinel <jorgeorpinel@users.noreply.github.com>
|
Thank you @nik123 ! 🙏 Sorry for the delay, we'll take it from here. |
* cmd ref: metrics diff: targets desc updated per treeverse/dvc#3963 * cmd ref: metrics show: targets desc updated per treeverse/dvc#3963
* cmd ref: metrics diff: targets desc updated per treeverse/dvc#3963 * cmd ref: metrics show: targets desc updated per treeverse/dvc#3963
Fixes #3924
cmd: pending plots changes by 1.0 release dvc.org#1414
It seems that changes might be covered in treeverse/dvc.org#1382. The list of required changes in docs:
--xlab->--x-labeland--ylab->--y-labeldvc metrics diff: help fortargetsparam should be changed toLimit command scope to these metric files. Using -R, directories to search metric files in can also be given.dvc metrics show: help fortargetsparam should be changed toLimit command scope to these metric files. Using -R, directories to search metric files in can also be given.dvc plots diff -h: command description should be updated (see discussion in comments).