-
Notifications
You must be signed in to change notification settings - Fork 29
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
Rework experiment commands and context menus to vary based on whether experiments have checkpoints #1738
Conversation
45721db
to
9ced5ff
Compare
9ced5ff
to
7e69bf3
Compare
const modifyExperimentParamsAndRun = () => | ||
experiments.pauseUpdatesThenRun(() => | ||
experiments.modifyExperimentParamsAndRun(AvailableCommands.EXPERIMENT_RUN) | ||
) |
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.
[F] This duplication is ugly and cumbersome but I could not find another way around.
@mattseddon Would it make sense to make the choice between Such as, if you have checkpoints, you still see the same comands/tooltips, but when you chose |
@daavoo fair suggestion. We could potentially put "conditional submenus" for context menus in that look like this: The further we go down this rabbit hole the worse our For everything else, the option would be to either:
I actually removed one example of 1 in this PR because myself and @shcheklein were very confused by the behaviour of the button when reviewing the product one day. The extra step in 2 would definitely annoy me. |
This is probably simplest and best, but there are some potential downsides to consider:
|
Could check |
[Q] This should only happen before any experiment has been committed, right?
Currently if there is any one dvc.yaml with checkpoints in the workspace we'll always show resume/reset and run. I think it would be ok to revisit when/if we get a feature request to change the logic. Wdyt?
What would I be looking for? There is nothing obvious in the |
Correct AFAIK.
Yup, sounds good. |
First of all, thanks, Matt for quickly changing this! It can improve the experience a lot 🙏
what was the reason / any details on this? |
We previously added this functionality to determine whether a project has checkpoints in #1281 to fix a race condition with workspace vs running experiment plots. We do this by watching this glob: join(this.dvcRoot, '**', 'dvc.yaml'), reading any yaml that has been updated and checking to see if any of the outs have a checkpoint field. We also initialize the workspace by first finding all of the I reused the functionality because it was already there. If we simply relied on the exp show data then when there are no experiments in the workspace we would only offer the option to run aka resume. IMO this would be a bigger issue. |
This is a pretty heavy fix I would say. Since we already have it that's fine. But I doubt it's sustainable. Scanning the whole repo for |
All of the watching/find is using tools provided by the |
Code Climate has analyzed commit 03ed320 and detected 2 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.8% (0.0% change). View more on Code Climate. |
1/2
main
<- this <- #1739Follow up based on the feedback provided in #1719. Thanks, @dberenbaum, @daavoo, @shcheklein.
This PR reworks the extension UI for running experiments. The experiments table webview context menus will be updated in the next PR.
As the title states, we will show different sets of commands based on whether or not the workspace contains checkpoint experiments.
No Checkpoints
The simpler version is when there are no checkpoints => There is a single run command. Versions of this are shown throughout the UI.
Checkpoints
When there are checkpoints => There are two commands, "resume" and "reset and run". Versions of these commands are shown throughout the UI
Please LMK if you have any feedback.
Note: We decide if a project is using checkpoint based experiments by parsing the
dvc.yaml
(s) in the workspace.Relates to #1711