-
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
Enable experiment operations when experiment(s) are running in the queue #3832
Conversation
f847d56
to
cd53016
Compare
cd53016
to
2c9eb22
Compare
COMMIT = 'commit', | ||
EXPERIMENT = 'experiment', | ||
QUEUED = 'queued' | ||
RUNNING = 'running', |
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] We need this to prevent actions being run from the experimentsTree
context menu for running experiments.
@@ -664,11 +664,11 @@ | |||
}, | |||
{ | |||
"command": "dvc.applyExperiment", | |||
"when": "dvc.commands.available && dvc.project.available && !dvc.experiment.running" | |||
"when": "dvc.commands.available && dvc.project.available && !dvc.experiment.running.workspace" |
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] We only want to suppress actions when there is an experiment running in the workspace.
@@ -1158,42 +1163,42 @@ | |||
{ | |||
"command": "dvc.views.experiments.applyExperiment", | |||
"group": "inline@1", | |||
"when": "view == dvc.views.experimentsTree && dvc.commands.available && viewItem == experiment && !dvc.experiment.running" | |||
"when": "view == dvc.views.experimentsTree && dvc.commands.available && viewItem == experiment && !dvc.experiment.running.workspace" |
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] viewItem == experiment
means none of these actions will be available for running experiments.
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'm going to add stop inline as a follow up
batchRowSelection={batchRowSelection} | ||
/> | ||
) | ||
}) => <NestedRow row={row} batchRowSelection={batchRowSelection} /> |
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] Using redux for this state instead of drilling
status: ExperimentStatus.SUCCESS, | ||
subRows: row.subRows?.map(subRow => ({ | ||
...subRow, | ||
status: ExperimentStatus.SUCCESS |
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] Have to set the status on each experiment for them to count as not running.
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.
Great work!
type?: ExperimentType | ||
selected?: boolean | ||
}): ThemeIcon | Uri | Resource { | ||
if (isRunning(status)) { |
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.
Are these helpers still useful if they're checking only the type? It was removed here, but used again in extension/src/experiments/model/index.ts
. We should stay consistent and either use them everywhere or remove them.
Code Climate has analyzed commit 2f63386 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 90.2% (85% is the threshold). This pull request will bring the total coverage in the repository to 94.7% (0.0% change). View more on Code Climate. |
1/3
main
<- this <- #3834 <- #3840Part of #3178
This PR makes it possible to run experiments operations when experiments are running in the queue. Actions will still be disabled on experiments running in the queue and on all experiments when there is an experiment running in the workspace.
Demo
Screen.Recording.2023-05-05.at.1.35.35.pm.mov