-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: introduce --with={default,live}
flag
#6716
Conversation
dvc/command/experiments.py
Outdated
|
||
if not live: | ||
ui.error_write() | ||
live = Confirm.ask( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to iterate on prompts separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, we don't need to block this PR, but how about, "Do you want to log checkpoints with dvclive"? We should probably make clear that this will generate checkpoints. Also, we will maybe want to link to dvclive docs.
dvc/command/experiments.py
Outdated
@@ -1548,6 +1592,13 @@ def add_parser(subparsers, parent_parser): | |||
experiments_init_parser.add_argument( | |||
"--live", help="Path to log dvclive outputs for your experiments" | |||
) | |||
experiments_init_parser.add_argument( | |||
"--with", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not so sure about this flag, can change to anything better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--type
? --format
? --stage
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer --type
, --stage
has a different meaning. Compared to --format
, --type
is more simpler.
This flag will select the different mode of outputs of stage. With `--with=live`, it'll enable `live` setting in the stage. On interactive mode, it'll always ask user if they want to use live (unless `--with=live` is specified), and then it'll skip metrics/plots question and moves on to ask for path to dvclive path. Also, if live setting is enabled in the stage, it'll set the `models` to be a checkpoint output.
--with={default,live}
flag--with={default,live}
flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a little clunky to me to ask about dvclive in the middle of entering paths. I think it's better to require --with
non-interactively (--name
, --run
, etc. aren't covered). It also fits with the description of --interactive
: Prompt for values that are not provided
.
Minor note: should --template
be removed at this point?
dvc/command/experiments.py
Outdated
@@ -1548,6 +1592,13 @@ def add_parser(subparsers, parent_parser): | |||
experiments_init_parser.add_argument( | |||
"--live", help="Path to log dvclive outputs for your experiments" | |||
) | |||
experiments_init_parser.add_argument( | |||
"--with", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--type
? --format
? --stage
?
dvc/command/experiments.py
Outdated
|
||
if not live: | ||
ui.error_write() | ||
live = Confirm.ask( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, we don't need to block this PR, but how about, "Do you want to log checkpoints with dvclive"? We should probably make clear that this will generate checkpoints. Also, we will maybe want to link to dvclive docs.
{ | ||
"cmd": "[b]Command[/b] to execute", | ||
"code": "Path to a [b]code[/b] file/directory", | ||
"data": "Path to a [b]data[/b] file/directory", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not include params here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to separate dependencies and then pipeline artifacts, but I don't need to. 😄
dvc/command/experiments.py
Outdated
if not live: | ||
ui.error_write() | ||
live = Confirm.ask( | ||
"Do you want to log training steps iteratively with " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this makes sense for dvc exp init -i --with=default
.
I felt the same way, I thought it was just me. I'll make it a requirement then. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
My only concern is that we may need to come back to the idea of custom templates again in the future. For example, users who mainly plot image files might want plots with cache: true
. We don't want to turn this into dvc stage add
, but it seems useful to enable a consistent stage structure, especially if it could be shared across projects. This seems like it might require some redesign if we ever need it, but for now it's just a note to keep in mind.
--with={default,live}
flag--with={default,live}
flag
This flag will select the different mode of outputs of stage.
With
--with=live
, it'll enablelive
setting in the stage.On interactive mode, it'll always ask user if they want to
use live (unless
--with=live
is specified), and then it'llskip metrics/plots question and moves on to ask for path to
dvclive path.
Also, if live setting is enabled in the stage, it'll set the
models
to be a checkpoint output.