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 a "Stop Running Experiment" command #305

Merged
merged 4 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"command": "dvc.runQueuedExperiments",
"category": "DVC"
},
{
"title": "%command.stopRunningExperiment%",
"command": "dvc.stopRunningExperiment",
"category": "DVC"
},
{
"title": "%command.experimentGarbageCollect%",
"command": "dvc.experimentGarbageCollect",
Expand Down Expand Up @@ -175,6 +180,11 @@
"command": "dvc.runQueuedExperiments",
"group": "experiments",
"when": "scmProvider == dvc"
},
{
"command": "dvc.stopRunningExperiment",
"group": "experiments",
"when": "scmProvider == dvc"
}
],
"scm/resourceState/context": [
Expand Down
1 change: 1 addition & 0 deletions extension/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"command.runExperiment": "Run Experiment",
"command.runResetExperiment": "Run and Reset Experiment",
"command.queueExperiment": "Queue Experiment",
"command.stopRunningExperiment": "Stop Running Experiment",
"command.applyExperiment": "Apply Experiment",
"command.branchExperiment": "Branch Experiment",
"command.removeExperiment": "Remove Experiment",
Expand Down
6 changes: 6 additions & 0 deletions extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ export class Extension {
)
)

this.dispose.track(
commands.registerCommand('dvc.stopRunningExperiment', () =>
this.runner.stop()
)
)

this.gitExtension = this.dispose.track(new GitExtension())

this.gitExtension.ready.then(() => {
Expand Down