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

Add experiment run reset to menus #1719

Merged
merged 5 commits into from
May 18, 2022
Merged

Add experiment run reset to menus #1719

merged 5 commits into from
May 18, 2022

Conversation

mattseddon
Copy link
Member

@mattseddon mattseddon commented May 16, 2022

Relates to #1711

Screenshots

image

image

image

@mattseddon mattseddon added the product PR that affects product label May 16, 2022
@mattseddon mattseddon self-assigned this May 16, 2022
@mattseddon mattseddon force-pushed the add-run-reset-everywhere branch from 9fac1f4 to 83eccac Compare May 17, 2022 01:11
@mattseddon mattseddon marked this pull request as ready for review May 17, 2022 01:15
@mattseddon mattseddon requested review from shcheklein and a team May 17, 2022 01:18
Copy link
Member

@shcheklein shcheklein left a comment

Choose a reason for hiding this comment

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

It looks good to me. Thinking more about this - I think we are in a better position to split those more explicitly and do similar thing to any IDEs - Run and Resume buttons instead of "Run (which is actually resume)" + "Reset and Run (which is just regular Run usually)". The current semantics is confusing, I'm making mistakes (granted that for some people that default semantics is better) - @dberenbaum @daavoo wdyt? The only downside is that it won't look and behave the same as in DVC :(

@mattseddon
Copy link
Member Author

It looks good to me. Thinking more about this - I think we are in a better position to split those more explicitly and do similar thing to any IDEs - Run and Resume buttons instead of "Run (which is actually resume)" + "Reset and Run (which is just regular Run usually)". The current semantics is confusing, I'm making mistakes (granted that for some people that default semantics is better) - @dberenbaum @daavoo wdyt? The only downside is that it won't look and behave the same as in DVC :(

WDYT about leaving this for now and making a breaking change in DVC? We would have two commands:

  1. dvc exp run
  2. dvc exp resume

The --reset flag could be dropped altogether.

We could then follow up to match the new commands.

For me it is important to match the DVC terminology but happy to do whatever is decided 👍🏻 .

[Q] Which command is actually more popular? Run or resume?

@dberenbaum
Copy link
Contributor

WDYT about leaving this for now and making a breaking change in DVC? We would have two commands:

1. `dvc exp run`

2. `dvc exp resume`

dvc exp resume existed in early versions of experiments exactly like you describe 😅. I can't remember why it changed, but I don't think the UI was noticeably better either way.

[Q] Which command is actually more popular? Run or resume?

We don't see a lot of usage of checkpoints, so hard to say. Both are essential to the workflow.

I think we are in a better position to split those more explicitly and do similar thing to any IDEs - Run and Resume buttons instead of "Run (which is actually resume)" + "Reset and Run (which is just regular Run usually)".

I don't think "Run" by itself is helpful with checkpoints because both reset and resume are running experiments. Not sure if separate resume and reset commands make sense in CLI, but I think we should use them in the VS Code menus.

For the menus, I would suggest:

  • Resume Experiment
  • Reset and Run Experiment
  • Run All Queued Experiments [should this be in a separate section below since it's about all queued experiments?]
    --
  • Modify Experiment Param(s) and Resume
  • Modify Experiment Param(s), Reset, and Run
  • Modify Experiment Param(s), Reset, and Queue
    --
  • Reset and Queue Experiment

Thoughts?


Related: exp run is doing too much, and at least modifying params could be separated from it.

For non-queue experiments, modifying params in the CLI is a convenience to avoid opening an editor, which isn't necessary for VS Code. You could have a separate option to modify params without doing anything else (either using the existing interface or by opening the params files in the editor). This may simplify the menu options and make it easier to review changes before running experiments.

For queuing, you could:

  1. Keep the existing options.
  2. Have a sub-menu/prompt after selecting "Queue Experiment" for whether to modify params.
  3. Enforce a workflow where users must make any modifications in the workspace and then queue.

@shcheklein
Copy link
Member

Makes sense @dberenbaum !

Do we need to / if we can detect that resume / reset are needed? E.g. if we see from the workspace that no matter what you do it will be the new experiment so that we can simplify the actions? And if it's

@mattseddon
Copy link
Member Author

For the menus, I would suggest:

  • Resume Experiment
  • Reset and Run Experiment
  • Run All Queued Experiments [should this be in a separate section below since it's about all queued experiments?]

  • Modify Experiment Param(s) and Resume
  • Modify Experiment Param(s), Reset, and Run
  • Modify Experiment Param(s), Reset, and Queue

  • Reset and Queue Experiment

Thoughts?

[Q] Can a non-checkpoint experiment be resumed? Does it make sense to even show these options when a project does not have checkpoints? Under what circumstances should an experiment be resumed?

For non-queue experiments, modifying params in the CLI is a convenience to avoid opening an editor, which isn't necessary for VS Code. You could have a separate option to modify params without doing anything else (either using the existing interface or by opening the params files in the editor). This may simplify the menu options and make it easier to review changes before running experiments.

I think we should cover this as part of #1537 rather than completely change the workflow now. Opening the file could be an interim step towards closing that story.

Next steps for me:

  1. Merge this PR.
  2. Raise a follow up based on further discussion here. Likely change run to resume, etc. Just need an answer on how relevant those menus are for non-checkpoint based projects.

@mattseddon mattseddon enabled auto-merge (squash) May 18, 2022 00:59
@codeclimate
Copy link

codeclimate bot commented May 18, 2022

Code Climate has analyzed commit 4970571 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

The test coverage on the diff in this pull request is 83.3% (85% is the threshold).

This pull request will bring the total coverage in the repository to 96.6% (-0.1% change).

View more on Code Climate.

@mattseddon mattseddon merged commit 17cab9a into main May 18, 2022
@mattseddon mattseddon deleted the add-run-reset-everywhere branch May 18, 2022 01:05
@daavoo
Copy link
Contributor

daavoo commented May 18, 2022

[Q] Can a non-checkpoint experiment be resumed?

Afaik, no. DVC will delete the outputs of the stage.

Does it make sense to even show these options when a project does not have checkpoints?

IMO, no. There is no concept (at least in DVC context) of resetting or resuming without checkpoints. Just run.

@@ -30,6 +30,7 @@
"command.pushTarget": "Push",
"command.modifyExperimentParamsAndQueue": "Modify Experiment Param(s) and Queue",
"command.modifyExperimentParamsAndRun": "Modify Experiment Param(s) and Run",
"command.modifyExperimentParamsResetAndRun": "Modify Experiment Param(s) Reset and Run",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"command.modifyExperimentParamsResetAndRun": "Modify Experiment Param(s) Reset and Run",
"command.modifyExperimentParamsResetAndRun": "Modify Experiment Param(s), Reset and Run",

@@ -60,6 +61,7 @@
"command.views.experimentsTree.queueExperiment": "Modify Param(s) and Queue",
"command.views.experimentsTree.removeExperiment": "Remove",
"command.views.experimentsTree.runExperiment": "Modify Param(s) and Run",
"command.views.experimentsTree.resetRunExperiment": "Modify Param(s) Reset and Run",
Copy link
Contributor

@dberenbaum dberenbaum May 18, 2022

Choose a reason for hiding this comment

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

Suggested change
"command.views.experimentsTree.resetRunExperiment": "Modify Param(s) Reset and Run",
"command.views.experimentsTree.resetRunExperiment": "Modify Param(s), Reset and Run",

@dberenbaum
Copy link
Contributor

Yes, I thought these options were only shown if existing checkpoints are found. If not, resume/reset options will not make sense.

@shcheklein
Copy link
Member

@dberenbaum @mattseddon @daavoo can we see if there are exiting checkpoints?

@dberenbaum
Copy link
Contributor

Yes, checkpoint commits should include a checkpoint_tip field, which I think are already being used for visual cues to show checkpoints as collapsible dotted lines under each experiment. I think it only makes sense to show reset/resume options when these exist.

@mattseddon
Copy link
Member Author

I'll follow up and tag everyone in the new PR.

@dberenbaum
Copy link
Contributor

  • Run All Queued Experiments

Follow-up on this language. Given upcoming changes in iterative/dvc#7592, it might make sense to reword to "Start the [Experiments] Queue."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR that affects product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants