Skip to content
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

Merged
merged 7 commits into from Sep 6, 2022
Merged

Plateau stopper #334

merged 7 commits into from Sep 6, 2022

Conversation

aaronkl
Copy link
Collaborator

@aaronkl aaronkl commented Sep 2, 2022

#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.

@aaronkl aaronkl requested a review from geoalgo September 2, 2022 10:01
mseeger
mseeger previously approved these changes Sep 2, 2022
@@ -118,3 +120,89 @@ def __call__(self, status: TuningStatus) -> bool:
)
return True
return False


class PlateauStopper(object):
Copy link
Collaborator

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.

mseeger
mseeger previously approved these changes Sep 4, 2022
from tst.util_test import temporary_local_backend


def test_plateau_scheduler():
Copy link
Contributor

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).

geoalgo
geoalgo previously approved these changes Sep 6, 2022
tst/test_plateau_stopper.py Outdated Show resolved Hide resolved
@aaronkl aaronkl merged commit 185b4ae into main Sep 6, 2022
@aaronkl aaronkl deleted the plateau_stopper branch September 6, 2022 09:17
@aaronkl aaronkl mentioned this pull request Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants