Skip to content

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
merged 16 commits into from
Feb 16, 2023

Conversation

LittleLittleCloud
Copy link
Contributor

@LittleLittleCloud LittleLittleCloud commented Feb 10, 2023

We are excited to review your PR.

So we can do the best job, please check:

  • There's a descriptive title that will make sense to other developers some time from now.
  • There's associated issues. All PR's should have issue(s) associated - unless a trivial self-evident change such as fixing a typo. You can use the format Fixes #nnnn in your description to cause GitHub to automatically close the issue(s) when your PR is merged.
  • Your change description explains what the change does, why you chose your approach, and anything else that reviewers should know.
  • You have included any necessary tests in the same PR.

why cancellation doesn't work for SweepablePipelineRunner

SweepablePipelineRunner cancels running trial by calling context.CancelExecution(). When starting a trial, SweepablePipelineRunner first registers a context.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 through using 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.

@LittleLittleCloud
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@LittleLittleCloud LittleLittleCloud changed the title fix cancellation bug in SweepablePipelineRunner fix cancellation bug in SweepablePipelineRunner && fix object null exception in AutoML v1.0 regression API Feb 13, 2023
@JakeRadMSFT
Copy link
Contributor

@LittleLittleCloud - Can you update the description a bit :)

@LittleLittleCloud
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@LittleLittleCloud LittleLittleCloud merged commit fe2a442 into dotnet:main Feb 16, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants