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: when to fail for non-existent params #6865

Closed
Tracked by #6446
dberenbaum opened this issue Oct 25, 2021 · 3 comments
Closed
Tracked by #6446

exp init: when to fail for non-existent params #6865

dberenbaum opened this issue Oct 25, 2021 · 3 comments
Assignees
Labels
A: experiments Related to dvc exp

Comments

@dberenbaum
Copy link
Collaborator

From #6750 (comment):

Can we validate that dependencies exist at the time of entry during interactive mode? It would save a lot of trouble with having to redo the whole stage after it fails at the end.

exp init fails if params.yaml does not exist since the params are parsed to generate the stage. Related: #6605.

In interactive mode, it would be nice to fail as soon as possible (right after path to params is provided).

For other dependencies, I wonder if dvc exp init should also validate that the paths exist. This could help guide users. It could be annoying if users want to do dvc exp init before creating projects files, but this seems unlikely to me outside of toy scenarios.

@dberenbaum dberenbaum changed the title exp init: exp init: when to fail for non-existent params Oct 25, 2021
@daavoo daavoo added the A: experiments Related to dvc exp label Oct 25, 2021
@daavoo
Copy link
Contributor

daavoo commented Oct 25, 2021

Should it fail, at all?

Maybe I'm a little out of context for intended dvc exp init usage but, would it be an unusual workflow in a fresh project to first use dvc exp init to bootstrap dvc stuff and later create related files (params, data deps)?

@dberenbaum
Copy link
Collaborator Author

For params, we don't have a choice but to fail unless we implement #6605, because we need to specify all the individual parameter names in dvc.yaml when creating the stage. You can't really bootstrap the parameters at the start of the project right now like that since DVC needs to know each parameter name.

Without other changes in functionality, we can either fail only for a missing parameters file, or fail for any missing dependency. At the very least, in interactive mode, we shouldn't prompt them several more times and then fail because the parameters file is missing. For the primary use case of making it easy for new users, it might be useful to guide them towards first creating the necessary dependencies and not ending up with a broken stage.

@skshetry skshetry mentioned this issue Oct 26, 2021
16 tasks
@skshetry
Copy link
Member

skshetry commented Nov 2, 2021

It makes sense to fail right away for the params as we need them to exist for us to create a stage. I am not so sure about other dependencies, we tried to decouple the runtime behaviour with the metadata tracking behaviour on stage add.

I'll add a check for the params.

skshetry added a commit to skshetry/dvc that referenced this issue Nov 3, 2021
It'll give a error message to the user and reprompt them.
This mechanism can be extended to other prompts, and we
can show a warning message and/or reprompt them based on
validations.

Closes iterative#6865. Part of iterative#6446.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: experiments Related to dvc exp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants