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

exp init: clean up error messages #7137

Closed
5 of 8 tasks
dberenbaum opened this issue Dec 13, 2021 · 1 comment · Fixed by #7331
Closed
5 of 8 tasks

exp init: clean up error messages #7137

dberenbaum opened this issue Dec 13, 2021 · 1 comment · Fixed by #7331
Assignees
Labels
ui user interface / interaction

Comments

@dberenbaum
Copy link
Collaborator

dberenbaum commented Dec 13, 2021

From #7130:

$ dvc -V
2.9.2
$ git init
$ dvc init
$ dvc exp init python train.py
ERROR: unexpected error - [Errno 2] No such file or directory: 'params.yaml'
  • Why is it unexpected error? It should be like “ERROR: hyperparameters file ‘params.yaml’ is missing”. 
 🤔 Why dvc exp init does not create it if it is required?

  • Do we really need [Errno 2]? In what cases the code helps users? This makes the message longer and breaks human readability.

$ dvc exp run
ERROR: failed to reproduce 'dvc.yaml': [Errno 2] No such file or directory: '/Users/dmitry/src/test/myproj/data'
  • full path. It is supposed to be relative. Why: 1) to make it short - the full path provides zero value in most of use cases; 2) it makes it hard to submit reports (some users are not comfortable to share their directories struture - See '/Users/dmitry/src/test/ - bc it might contain confidential info like user and project names.

  • why dvc exp init checked params.yaml but didn’t check (or create) data/ & src/?

$ mkdir data
$ dvc exp run
ERROR: failed to reproduce 'dvc.yaml': [Errno 2] No such file or directory: '/Users/dmitry/src/test/myproj/src'
  • the same questions - [Errno 2], Full path.

  • why it was not checked in dvc init? Or was not created?

$ mkdir src
$ dvc exp run
…
python: can't open file 'train.py': [Errno 2] No such file or directory
ERROR: failed to reproduce 'dvc.yaml': failed to run: python train.py, exited with 2
  • “exited with 2” Is it useful information? Where the exit code 2 belongs to? It might confuse users. Error code can be in debug errors not here.

  • Another issue - ideally, we should have a reference to stage (a user might have multiple stages with the same or similar commands). The message might look like:
 ERROR: failed to execute stage ‘train’ from ‘dvc.yaml’

@dberenbaum dberenbaum added the ui user interface / interaction label Dec 13, 2021
@dberenbaum dberenbaum added this to DVC Dec 17, 2021
@dberenbaum dberenbaum moved this to Backlog in DVC Dec 17, 2021
@skshetry
Copy link
Member

“exited with 2” Is it useful information? Where the exit code 2 belongs to? It might confuse users. Error code can be in debug errors not here.

I disagree with this, exit codes are important, well that's how you know it's succeeded or failed (or crashed).

Do we really need [Errno 2]? In what cases the code helps users? This makes the message longer and breaks human readability.
$ dvc exp run
ERROR: failed to reproduce 'dvc.yaml': [Errno 2] No such file or directory: '/Users/dmitry/src/test/myproj/data'

This is unrelated to dvc exp init and out of scope to be honest for this. This is part of a larger issue with DVC and happens in all of the commands. When I brought this a year ago for #5387, there were disagreements on how to handle these errors (cc @efiop).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui user interface / interaction
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants