Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions flaml/tune/searcher/blendsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,26 @@ def __init__(
sampler = ot.samplers.TPESampler(seed=gs_seed, multivariate=True, group=True)
else:
sampler = None
try:
assert evaluated_rewards
self._gs = GlobalSearch(
space=gs_space,
metric=metric,
mode=mode,
seed=gs_seed,
sampler=sampler,
points_to_evaluate=self._evaluated_points,
evaluated_rewards=evaluated_rewards,
)
except (AssertionError, ValueError):

if evaluated_rewards:
try:
self._gs = GlobalSearch(
space=gs_space,
metric=metric,
mode=mode,
seed=gs_seed,
sampler=sampler,
points_to_evaluate=self._evaluated_points,
evaluated_rewards=evaluated_rewards,
)
except ValueError:
try_without_warmup = True
else:
try_without_warmup = False
else:
try_without_warmup = True

if try_without_warmup:
self._gs = GlobalSearch(
space=gs_space,
metric=metric,
Expand Down