Skip to content

Commit

Permalink
Update make_searcher utility
Browse files Browse the repository at this point in the history
  • Loading branch information
lixfz committed Feb 9, 2024
1 parent 3b2dae4 commit efc34ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hypernets/searchers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@ def make_searcher(cls, search_space_fn, optimize_direction='min', objectives=Non

cls = get_searcher_cls(cls)

if cls == EvolutionSearcher:
if cls is EvolutionSearcher:
default_kwargs = dict(population_size=30, sample_size=10, candidates_size=10,
regularized=True, use_meta_learner=True, optimize_direction=optimize_direction)
elif cls == MCTSSearcher:
elif cls is MCTSSearcher:
default_kwargs = dict(max_node_space=10, optimize_direction=optimize_direction)
elif cls is GridSearcher:
default_kwargs = dict(optimize_direction=optimize_direction)
elif cls is RandomSearcher:
default_kwargs = dict(optimize_direction=optimize_direction)
elif issubclass(cls, MOOSearcher):
default_kwargs = dict(objectives=objectives)
else:
Expand Down

0 comments on commit efc34ce

Please sign in to comment.