Skip to content

Commit

Permalink
Update aiaccel/hpo/samplers/nelder_mead_sampler.py
Browse files Browse the repository at this point in the history
Co-authored-by: Yoshiaki Bando <[email protected]>
  • Loading branch information
KanaiYuma-aist and yoshipon authored Mar 7, 2024
1 parent 40b0192 commit 3e0a517
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aiaccel/hpo/samplers/nelder_mead_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ def _generator(self) -> Generator[np.ndarray, None, None]:
# initialization
lows, highs = zip(*self._search_space.values())
self.vertices = self._rng.uniform(lows, highs, (self.dimension + 1, self.dimension))
self.values = np.empty(self.dimension + 1)

yield from self.vertices
results = yield from self._waiting_for_list(len(self.vertices))
self.values = np.array(results)
self.values[:] = yield from self._waiting_for_list(len(self.vertices))

# main loop
shrink_requied = False
Expand Down

0 comments on commit 3e0a517

Please sign in to comment.