mirror of
https://github.com/microsoft/autogen.git
synced 2025-11-02 02:40:21 +00:00
bug fix
This commit is contained in:
parent
23c8ce7130
commit
14d59effbe
@ -24,8 +24,9 @@ AutoML
|
||||
Tune
|
||||
------
|
||||
|
||||
.. automodule:: flaml.tune
|
||||
:members:
|
||||
.. autofunction:: flaml.tune.run
|
||||
|
||||
.. autofunction:: flaml.tune.report
|
||||
|
||||
.. autoclass:: flaml.BlendSearch
|
||||
:members:
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user