-
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 the user to specify a number of concurrent jobs when starting the experiments queue #3048
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
04fe91e
switch runner for executor
mattseddon ad5ee4b
wire up starting the queue with input box
mattseddon f5e928d
reorder command and event lists
mattseddon 89e1efa
refactor input box validator
mattseddon 832a176
Merge branch 'main' into queue-quick-pick
mattseddon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -439,17 +439,23 @@ suite('Workspace Experiments Test Suite', () => { | |
|
||
describe('dvc.startExperimentsQueue', () => { | ||
it('should be able to execute all experiments in the run queue', async () => { | ||
const mockRunExperimentQueue = stub( | ||
DvcRunner.prototype, | ||
'runExperimentQueue' | ||
).resolves(undefined) | ||
const mockQueueStart = stub(DvcExecutor.prototype, 'queueStart').resolves( | ||
undefined | ||
) | ||
|
||
const dDosNumberOfJobs = '10000' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [F] May or may not have run this by accident whilst testing the input box... |
||
|
||
const mockInputBox = stub(window, 'showInputBox').resolves( | ||
dDosNumberOfJobs | ||
) | ||
|
||
stubWorkspaceExperimentsGetters(dvcDemoPath) | ||
|
||
await commands.executeCommand(RegisteredCliCommands.EXPERIMENT_RUN_QUEUED) | ||
await commands.executeCommand(RegisteredCliCommands.QUEUE_START) | ||
|
||
expect(mockRunExperimentQueue).to.be.calledOnce | ||
expect(mockRunExperimentQueue).to.be.calledWith(dvcDemoPath) | ||
expect(mockQueueStart).to.be.calledOnce | ||
expect(mockQueueStart).to.be.calledWith(dvcDemoPath, dDosNumberOfJobs) | ||
expect(mockInputBox) | ||
}) | ||
}) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,27 @@ export const getValidInput = ( | |
validateInput, | ||
value: options?.value | ||
}) | ||
|
||
export const getPositiveIntegerInput = async ( | ||
title: Title, | ||
options: { prompt: string; value: string } | ||
) => { | ||
const input = await getValidInput( | ||
title, | ||
val => { | ||
const number = Number(val) | ||
|
||
if (!Number.isInteger(number) || number <= 0) { | ||
return 'Input needs to be a positive integer' | ||
} | ||
|
||
return '' | ||
}, | ||
options | ||
) | ||
|
||
if (!input) { | ||
return | ||
} | ||
return Number.parseInt(input).toString() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [F] I'll follow up to bring |
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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] I've moved this from here into the executor (no output is returned to the runner's terminal anymore anyway).
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.
The legacy behaviour was for all of the logs to be fed into the terminal's output.