mirror of
https://github.com/clearml/clearml
synced 2025-03-03 10:42:00 +00:00
Revert Optuna deprecation fix (#613)
This commit is contained in:
parent
6fb49fcd03
commit
eed8f8cdfd
@ -1,4 +1,3 @@
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from time import sleep
|
||||
from typing import Any, Optional, Sequence
|
||||
|
||||
@ -175,9 +174,8 @@ class OptimizerOptuna(SearchStrategy):
|
||||
sleep_interval=int(self.pool_period_minutes * 60),
|
||||
config_space=config_space,
|
||||
)
|
||||
with ThreadPoolExecutor(max_workers=self._num_concurrent_workers) as executor:
|
||||
for _ in range(self._num_concurrent_workers):
|
||||
executor.submit(self._study.optimize, self._objective.objective, n_trials=self.total_max_jobs)
|
||||
self._study.optimize(
|
||||
self._objective.objective, n_trials=self.total_max_jobs, n_jobs=self._num_concurrent_workers)
|
||||
|
||||
def stop(self):
|
||||
# type: () -> ()
|
||||
|
Loading…
Reference in New Issue
Block a user