diff --git a/flaml/searcher/flow2.py b/flaml/searcher/flow2.py index 57cb401cfa..b0f4c22ab8 100644 --- a/flaml/searcher/flow2.py +++ b/flaml/searcher/flow2.py @@ -529,11 +529,12 @@ def suggest(self, trial_id: str) -> Optional[Dict]: for i, key in enumerate(self._tunable_keys): move[key] -= self._direction_tried[i] self._direction_tried = None - # propose a new direction - self._direction_tried = self.rand_vector_unit_sphere( - self.dim) * self.step - for i, key in enumerate(self._tunable_keys): - move[key] += self._direction_tried[i] + else: + # propose a new direction + self._direction_tried = self.rand_vector_unit_sphere( + self.dim) * self.step + for i, key in enumerate(self._tunable_keys): + move[key] += self._direction_tried[i] self._project(move) config = self.denormalize(move) self._proposed_by[trial_id] = self.incumbent diff --git a/flaml/version.py b/flaml/version.py index 334b899568..a8d4557d26 100644 --- a/flaml/version.py +++ b/flaml/version.py @@ -1 +1 @@ -__version__ = "0.3.4" +__version__ = "0.3.5"