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
Plateau stopper #334
Plateau stopper #334
Conversation
@@ -118,3 +120,89 @@ def __call__(self, status: TuningStatus) -> bool: | |||
) | |||
return True | |||
return False | |||
|
|||
|
|||
class PlateauStopper(object): |
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.
It would be nice to be able to combine this with another stop criterion (stop once any of them return true).
Could be done in another PR.
tst/test_plateau_stopper.py
Outdated
from tst.util_test import temporary_local_backend | ||
|
||
|
||
def test_plateau_scheduler(): |
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.
This is more of a integration/smoke test. It would be nice to have a unit-test in addition that tests more cases with artificial cases. This can be done by just showing artificial results (updating a tuning status) to the plateau and checking that the right behavior (stop or not stop) is obtained for patience/mode/top values.
It is very easy to have an error sneaking in otherwise (for instance with some combination of mode/patience).
#330
Description of changes: Implements a stopping criterion that terminates the HPO process if the metric hasn't improved for N consecutive steps.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.