From fa96bee0183ace19ae3fb16674830d504608df00 Mon Sep 17 00:00:00 2001 From: Sarah Krebs Date: Tue, 30 Jul 2024 15:51:17 +0200 Subject: [PATCH] Add information on handling of stopIteration error --- CHANGELOG.md | 5 +++++ smac/intensifier/intensifier.py | 4 ++++ smac/intensifier/successive_halving.py | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72bdf2922..e1ee1aa59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 2.2.1 + +## Improvements +- Add logger information on handling of stopIteration error (#960) + # 2.2.0 ## Features diff --git a/smac/intensifier/intensifier.py b/smac/intensifier/intensifier.py index 345013f87..9a407dfb2 100644 --- a/smac/intensifier/intensifier.py +++ b/smac/intensifier/intensifier.py @@ -232,6 +232,10 @@ def __iter__(self) -> Iterator[TrialInfo]: fails = -1 except StopIteration: # We stop if we don't find any configuration anymore + logger.warning( + "If you assume your configspace was not yet exhausted, try to " + "increase the number of retries in the config selector." + ) return else: logger.debug("Start finding a new challenger in the queue:") diff --git a/smac/intensifier/successive_halving.py b/smac/intensifier/successive_halving.py index 58960ca67..96f018b89 100644 --- a/smac/intensifier/successive_halving.py +++ b/smac/intensifier/successive_halving.py @@ -448,6 +448,10 @@ def __iter__(self) -> Iterator[TrialInfo]: # noqa: D102 configs.append(config) except StopIteration: # We stop if we don't find any configuration anymore + logger.warning( + "If you assume your configspace was not yet exhausted, try to " + "increase the number of retries in the config selector." + ) return # We keep track of the seed so we always evaluate on the same instances