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

plots show: targets are required but help output indicates otherwise [qa] #3925

Closed
3 tasks
jorgeorpinel opened this issue Jun 1, 2020 · 6 comments · Fixed by #3940
Closed
3 tasks

plots show: targets are required but help output indicates otherwise [qa] #3925

jorgeorpinel opened this issue Jun 1, 2020 · 6 comments · Fixed by #3940
Assignees
Labels
bug Did we break something? p0-critical Critical issue. Needs to be fixed ASAP. ui user interface / interaction

Comments

@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Jun 1, 2020

Bug Report

Help output indicates targets are optional, but an error is thrown if not provided:

λ dvc plots show -h
usage: dvc plots show [-h] [-q | -v] [-t [TEMPLATE]] [-o OUT] [-x X] [-y Y] [--no-csv-header] [--show-json] [--title TITLE] [--xlab XLAB]
                      [--ylab YLAB]
                      [targets [targets ...]]
...
positional arguments:
  targets               Metrics files to visualize. Shows all plots by default.

λ dvc plots show
ERROR: Datafile or template is not specified.
  • I assume targets are indeed required so they should be printed without [] in the usage, and the param description should not read "Shows all plots by default."
    UPDATE: Improve the error message when there are no plots in the workspace.

    • and update docs (figure out exact behavior first)
  • Also note that the error uses the term "Datafile" which is confusing as it's no longer the name of the argument — Let's probably review this term all over the code base, not just in this one message?

Please provide information about your setup

DVC 1.0.0a6+283718

@jorgeorpinel jorgeorpinel added bug Did we break something? triage Needs to be triaged labels Jun 1, 2020
@triage-new-issues triage-new-issues bot removed the triage Needs to be triaged label Jun 1, 2020
@efiop
Copy link
Contributor

efiop commented Jun 1, 2020

Without targets it should collect and show all plots. Might be caused by #3911 CC @Suor

@efiop efiop added the p0-critical Critical issue. Needs to be fixed ASAP. label Jun 1, 2020
@jorgeorpinel
Copy link
Contributor Author

OK. Well I don't have any plots when I run it. How do you register plots? Did we end up adding an option for dvc run? I'm still a bit lost in the 1.0 changes, sorry!

@skshetry
Copy link
Member

skshetry commented Jun 2, 2020

@jorgeorpinel, we have --plots and --plots-no-cache option in the dvc run.

@Suor
Copy link
Contributor

Suor commented Jun 2, 2020

I didn't change this behavior, we still show all plots. Besides those options in run we can use dvc plots modify on any out to mark it as plot and add some props.

@jorgeorpinel jorgeorpinel added the ui user interface / interaction label Jun 2, 2020
@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Jun 2, 2020

So maybe the problem here is that when there are no plots in the project, e.g. in a new DVC repo, the error message is misleading? Maybe it should check for this particular condition and have a special error message. If that's the case I wouldn't call this a p0 🙂

@efiop
Copy link
Contributor

efiop commented Jun 2, 2020

Confirmed. This is something that I've missed initially.

(dvc-3.8.3) ➜  dvc git:(fix-1545) ✗ dvc plots show                                     
ERROR: Datafile or template is not specified.                                          
                                                                                       
Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!

This is a p0.

@efiop efiop self-assigned this Jun 2, 2020
efiop added a commit to efiop/dvc that referenced this issue Jun 3, 2020
Consistent with `dvc metrics show/diff` behaviour.

Fixes iterative#3925
efiop added a commit that referenced this issue Jun 3, 2020
Consistent with `dvc metrics show/diff` behaviour.

Fixes #3925
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Did we break something? p0-critical Critical issue. Needs to be fixed ASAP. ui user interface / interaction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants