-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix cancellation bug in SweepablePipelineRunner && fix object null exception in AutoML v1.0 regression API #6560
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
Merged
LittleLittleCloud
merged 16 commits into
dotnet:main
from
LittleLittleCloud:u/xiaoyun/cancel
Feb 16, 2023
Merged
fix cancellation bug in SweepablePipelineRunner && fix object null exception in AutoML v1.0 regression API #6560
LittleLittleCloud
merged 16 commits into
dotnet:main
from
LittleLittleCloud:u/xiaoyun/cancel
Feb 16, 2023
Conversation
This file contains hidden or 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
2c7f4b9
to
e7982f8
Compare
michaelgsharp
approved these changes
Feb 10, 2023
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
@LittleLittleCloud - Can you update the description a bit :) |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We are excited to review your PR.
So we can do the best job, please check:
Fixes #nnnn
in your description to cause GitHub to automatically close the issue(s) when your PR is merged.why cancellation doesn't work for SweepablePipelineRunner
SweepablePipelineRunner cancels running trial by calling
context.CancelExecution()
. When starting a trial, SweepablePipelineRunner first registers acontext.CancelExecution()
callback on cancellationtoken which will be triggered if cancellationtoken get cancelled. Then blocking on the running task until trial completed.The register callback will be unregistered after running trial completed throughusing
statement.The cause of cancellation doesn't work is SweepablePipelineRunner doesn't actually block on running trial. It simply create a wrapped task that kick off a trial, and return that task immediately. After the wrapped task is returned, the
context.CancelExecution()
will be unregistered and the running trial won't be cancelled any more.The fix is simply change SweepablePipelineRunner to wait until the trial task is completed before return.