Merge pull request #6960 from italodamato/opt-ask-force-new-points

remove `random_state` condition when sampling random points
This commit is contained in:
Matthias 2022-06-10 19:45:36 +02:00 committed by GitHub
commit e8f8cd9d36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -436,8 +436,7 @@ class Hyperopt:
asked = unique_list(self.opt.ask(n_points=n_points * 5))
is_random = [False for _ in range(len(asked))]
else:
asked = unique_list(self.opt.space.rvs(
n_samples=n_points * 5, random_state=self.random_state + i))
asked = unique_list(self.opt.space.rvs(n_samples=n_points * 5))
is_random = [True for _ in range(len(asked))]
is_random_non_tried += [rand for x, rand in zip(asked, is_random)
if x not in self.opt.Xi