mirror of
https://github.com/microsoft/autogen.git
synced 2025-11-10 14:54:41 +00:00
bug fix
This commit is contained in:
parent
23c8ce7130
commit
14d59effbe
@ -24,8 +24,9 @@ AutoML
|
|||||||
Tune
|
Tune
|
||||||
------
|
------
|
||||||
|
|
||||||
.. automodule:: flaml.tune
|
.. autofunction:: flaml.tune.run
|
||||||
:members:
|
|
||||||
|
.. autofunction:: flaml.tune.report
|
||||||
|
|
||||||
.. autoclass:: flaml.BlendSearch
|
.. autoclass:: flaml.BlendSearch
|
||||||
:members:
|
:members:
|
||||||
|
|||||||
@ -258,7 +258,7 @@ def train_estimator(X_train, y_train, config_dic, task,
|
|||||||
n_jobs=n_jobs)
|
n_jobs=n_jobs)
|
||||||
if X_train is not None:
|
if X_train is not None:
|
||||||
train_time = train_model(estimator, X_train, y_train, budget,
|
train_time = train_model(estimator, X_train, y_train, budget,
|
||||||
**fit_kwargs)
|
fit_kwargs)
|
||||||
else:
|
else:
|
||||||
estimator = estimator.estimator_class(**estimator.params)
|
estimator = estimator.estimator_class(**estimator.params)
|
||||||
train_time = time.time() - start_time
|
train_time = time.time() - start_time
|
||||||
|
|||||||
@ -396,15 +396,15 @@ class BlendSearch(Searcher):
|
|||||||
|
|
||||||
class CFO(BlendSearch):
|
class CFO(BlendSearch):
|
||||||
''' class for CFO algorithm
|
''' class for CFO algorithm
|
||||||
Number of threads is 1 or 2. Thread 0 is a vacuous thread.
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
__name__ = 'CFO'
|
__name__ = 'CFO'
|
||||||
|
|
||||||
def suggest(self, trial_id: str) -> Optional[Dict]:
|
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)
|
assert len(self._search_thread_pool)<3, len(self._search_thread_pool)
|
||||||
if len(self._search_thread_pool) < 2:
|
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
|
# Need to restart
|
||||||
self._init_used = False
|
self._init_used = False
|
||||||
return super().suggest(trial_id)
|
return super().suggest(trial_id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user