This commit is contained in:
Chi Wang (MSR) 2021-02-05 22:45:02 -08:00
parent 23c8ce7130
commit 14d59effbe
3 changed files with 6 additions and 5 deletions

View File

@ -24,8 +24,9 @@ AutoML
Tune
------
.. automodule:: flaml.tune
:members:
.. autofunction:: flaml.tune.run
.. autofunction:: flaml.tune.report
.. autoclass:: flaml.BlendSearch
:members:

View File

@ -258,7 +258,7 @@ def train_estimator(X_train, y_train, config_dic, task,
n_jobs=n_jobs)
if X_train is not None:
train_time = train_model(estimator, X_train, y_train, budget,
**fit_kwargs)
fit_kwargs)
else:
estimator = estimator.estimator_class(**estimator.params)
train_time = time.time() - start_time

View File

@ -396,15 +396,15 @@ class BlendSearch(Searcher):
class CFO(BlendSearch):
''' class for CFO algorithm
Number of threads is 1 or 2. Thread 0 is a vacuous thread.
'''
__name__ = 'CFO'
def suggest(self, trial_id: str) -> Optional[Dict]:
# Number of threads is 1 or 2. Thread 0 is a vacuous thread
assert len(self._search_thread_pool)<3, len(self._search_thread_pool)
if len(self._search_thread_pool) < 2:
# When a local converges, the number of threads is 1.
# When a local converges, the number of threads is 1
# Need to restart
self._init_used = False
return super().suggest(trial_id)