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: support interactive and explicit options #6681

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

skshetry
Copy link
Member

@skshetry skshetry commented Sep 24, 2021

This PR adds support for --interactive and --explicit options. This does not have support for templates, which still requires some thought. This change also makes dvclive optional, it'll be only applied if the --live flag is used or the user responds interactively (where it'll still be asked for by default).

Also adds the --force flag to mirror dvc stage add.

This includes stuff we have discussed in #6637 (comment) so far.
If we still need templates, it could be done over this.

Supersedes #6630 and #6637.

Comment on lines +860 to +863
message = (
"This command will guide you to set up your first stage in "
"[green]dvc.yaml[/green].\n"
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were some suggestions to do dvc init if we detect that there's no dvc repo. dvc exp init is likely going to be used for the first time, so I added that up, but we could autodetect the presence of dvc.yaml file as well to have heading or not.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, that sounds great!

Copy link
Collaborator

@dberenbaum dberenbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The non-dvclive scenario looks good, although I think we could still guide the users more with the messaging, assuming that they don't know anything about dvc experiments, stages, etc.

For dvclive, I still think it needs to be separate or handled a bit differently because:

  • It should assume the models output has checkpoint: true.
  • It should not ask for metrics or plots since dvclive should handle these. In more complex stages, maybe there could be scenarios where users have additional custom metrics/plots, but I think this would confuse new users.

Comment on lines +860 to +863
message = (
"This command will guide you to set up your first stage in "
"[green]dvc.yaml[/green].\n"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, that sounds great!

@skshetry
Copy link
Member Author

although I think we could still guide the users more with the messaging, assuming that they don't know anything about dvc experiments, stages, etc.

Could you please suggest some examples? Also it may be a bit noisy.

For dvclive, I still think it needs to be separate or handled a bit differently because:

  • It should assume the models output has checkpoint: true.
  • It should not ask for metrics or plots since dvclive should handle these. In more complex stages, maybe there could be scenarios where users have additional custom metrics/plots, but I think this would confuse new users.

I think the easiest way to do that is to ask the user about dvclive before metrics/plots and then skip prompts after that.

@dberenbaum
Copy link
Collaborator

dberenbaum commented Sep 27, 2021

Could you please suggest some examples? Also it may be a bit noisy.

See the comment in #6637 (comment):

Suggested wording: Path to data file/directory on which the experiment depends [leave blank for "data", type "n" to omit]: (we might need to state "on which the experiment depends" or similar since "data" is very generic). We can also tweak this later if we agree on the blank vs. "n" input behavior.

As mentioned there, we could tweak it later, so no need to block this PR to agree on the wording.


I think the easiest way to do that is to ask the user about dvclive before metrics/plots and then skip prompts after that.

Why not just ask at the start like: "Do you want to log training steps iteratively with dvclive?"

How do you anticipate this working for non-interactive mode?

I'm still wondering whether the template option is needed (solely as a cli option, not as an actual template; it could be renamed) to separate the dvclive scenario and provide flexibility to add other scenarios in the future. What do you think?

@skshetry skshetry merged commit 4668a35 into iterative:master Sep 28, 2021
@skshetry skshetry deleted the exp-init-interactive branch September 28, 2021 08:51
@skshetry skshetry mentioned this pull request Sep 28, 2021
16 tasks
@efiop efiop added the feature is a feature label Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants