Fix bug in _BlackboxSimulatorBackend for pause/resume scheduling (iss… #317
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.
…ue #304)
*Issue #, if available: #304
Description of changes:
Fixes bug which affects pause-and-resume scheduling (ASHA promotion, sync HB) with blackbox backend. The fix requires a small extension of the TrialScheduler API: pause_trial needs to receive the result which led the scheduler to make the pause decision. I left this optional, if the result is not passed, the simulated backend will behave differently as intended (namely, resumed trials will be started from scratch). But the Tuner can easily pass this information. To me, this API extension makes sense: give the backend information about why a trial has been paused.
For API consistency, I did the same extension for stop_trial, even though this is not needed right now. Note that these changes are internal API between backend and Tuner, the user does not notice this at all.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.