jrbourbeau / dask-optuna

Scale Optuna with Dask
https://jrbourbeau.github.io/dask-optuna/
MIT License
35 stars 6 forks source link

AssertionError: daemonic processes are not allowed to have children - dask_optuna #26

Open aktiver opened 2 years ago

aktiver commented 2 years ago

@jrbourbeau -

Code:

10 with joblib.parallel_backend("dask"):
---> 11     study.optimize(objective, n_trials=2, n_jobs=3)
     13 print(f"best_params = {study.best_params}")

Error:

File /usr/lib/python3.8/multiprocessing/process.py:118, in start()
    115 assert self._popen is None, 'cannot start a process twice'
    116 assert self._parent_pid == os.getpid(), \
    117        'can only start a process object created by current process'
--> 118 assert not _current_process._config.get('daemon'), \
    119        'daemonic processes are not allowed to have children'
    120 _cleanup()
    121 self._popen = self._Popen(self)

AssertionError: daemonic processes are not allowed to have children