Skip to content

Commit

Permalink
Bump 0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lixfz committed Feb 23, 2024
1 parent 0a6f962 commit e9bb5cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hypernets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding:utf-8 -*-
__author__ = 'yangjian'
__version__ = '0.3.1'
__version__ = '0.3.2'
7 changes: 3 additions & 4 deletions hypernets/experiment/_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def to_objective_object(o, force_minimize=False, **kwargs):


def to_search_object(search_space, optimize_direction, searcher, searcher_options,
reward_metric=None, scorer=None, objectives=None, task=None, pos_label=None):

reward_metric=None, scorer=None, objectives=None, task=None, pos_label=None):
def to_searcher(cls, options):
assert search_space is not None, '"search_space" should be specified if "searcher" is None or str.'
assert optimize_direction in {'max', 'min'}
Expand Down Expand Up @@ -352,7 +351,7 @@ def append_early_stopping_callbacks(cbs):

if eval_data is not None:
from hypernets.experiment import MLEvaluateCallback
if task in [const.TASK_REGRESSION, const.TASK_BINARY, const.TASK_MULTICLASS]\
if task in [const.TASK_REGRESSION, const.TASK_BINARY, const.TASK_MULTICLASS] \
and searcher.kind() == const.SEARCHER_SOO:
if evaluation_persist_prediction is True:
persist_dir = evaluation_persist_prediction_dir
Expand All @@ -371,7 +370,7 @@ def append_early_stopping_callbacks(cbs):
discriminator = make_discriminator(cfg.experiment_discriminator,
optimize_direction=optimize_direction,
**(cfg.experiment_discriminator_options or {}))
elif discriminator is False:
elif isinstance(discriminator, bool):
discriminator = None

if id is None:
Expand Down

0 comments on commit e9bb5cf

Please sign in to comment.