diff --git a/mlos_bench/mlos_bench/optimizers/one_shot_optimizer.py b/mlos_bench/mlos_bench/optimizers/one_shot_optimizer.py index 088ed03bdf..314d048298 100644 --- a/mlos_bench/mlos_bench/optimizers/one_shot_optimizer.py +++ b/mlos_bench/mlos_bench/optimizers/one_shot_optimizer.py @@ -18,7 +18,7 @@ class OneShotOptimizer(MockOptimizer): """ - Mock optimizer that proposes a single configuration and returns. + No-op optimizer that proposes a single configuration and returns. Explicit configs (partial or full) are possible using configuration files. """ @@ -33,6 +33,14 @@ def __init__(self, _LOG.info("Run a single iteration for: %s", self._tunables) self._max_iter = 1 # Always run for just one iteration. + def suggest(self) -> TunableGroups: + """ + Always produce the same (initial) suggestion. + """ + tunables = super().suggest() + self._start_with_defaults = True + return tunables + @property def supports_preload(self) -> bool: return False