From e5123f55956efd64f5c2e4fdb495de0e47cc669b Mon Sep 17 00:00:00 2001 From: Chi Wang Date: Sat, 1 May 2021 00:19:41 +0000 Subject: [PATCH] V0.3.5 (#84) * choose one direction --- flaml/searcher/flow2.py | 11 ++++++----- flaml/version.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) 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"