-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Steps to recreate
pip install dask_optuna
conda install python
Select Package Versions
dask_optuna: 0.0.2
optuna: 2.4.0
scipy: 1.4.0
numpy: 1.19
Execute example script
import joblib
import dask.distributed
import dask_optuna
def objective(trial):
x = trial.suggest_uniform("x", -10, 10)
return (x - 2) ** 2
with dask.distributed.Client() as client:
# Create a study using Dask-compatible storage
storage = dask_optuna.DaskStorage()
study = optuna.create_study(storage=storage)
# Optimize in parallel on your Dask cluster
with joblib.parallel_backend("dask"):
study.optimize(objective, n_trials=100, n_jobs=-1)
print(f"best_params = {study.best_params}")
error message:
File "<stdin>", line 3, in <module>
TypeError: Can't instantiate abstract class DaskStorage with abstract methods get_study_directions, set_study_directions, set_trial_values
the example works fine with optuna: 2.3.0.
Metadata
Metadata
Assignees
Labels
No labels