Skip to content

Error on windows: daemonic processes are not allowed to have children #225

Description

@M-Kristof

I am encountering a problem when running lists of learners in a jupyterlab notebook on a windows machine.

For example, when trying out 'Balancing learner' of the introductory notebook,

importadaptiveadaptive.notebook_extension()
# Import modules that are used in multiple cellsimportholoviewsashvimportnumpyasnpfromfunctoolsimportpartialimportrandomdefh(x, offset=0):
a=0.01returnx+a**2/ (a**2+ (x-offset)**2)
learners= [adaptive.Learner1D(partial(h, offset=random.uniform(-1, 1)),
bounds=(-1, 1)) foriinrange(10)]
bal_learner=adaptive.BalancingLearner(learners)
runner=adaptive.Runner(bal_learner, goal=lambdal: l.loss() <0.01)
runner.live_info()

I get the following error message:

future: <Task finished coro=<_wrap_awaitable() done, defined at C:\ProgramData\Anaconda3\lib\asyncio\tasks.py:596> exception=AssertionError('daemonic processes are not allowed to have children')>
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\asyncio\tasks.py", line 603, in _wrap_awaitable
return (yield from awaitable.__await__())
File "C:\ProgramData\Anaconda3\lib\site-packages\distributed\nanny.py", line 245, in start
response = await self.instantiate()
File "C:\ProgramData\Anaconda3\lib\site-packages\distributed\nanny.py", line 328, in instantiate
result = await self.process.start()
File "C:\ProgramData\Anaconda3\lib\site-packages\distributed\nanny.py", line 502, in start
await self.process.start()
File "C:\ProgramData\Anaconda3\lib\site-packages\distributed\process.py", line 33, in _call_and_set_future
res = func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\distributed\process.py", line 190, in _start
process.start()
File "C:\ProgramData\Anaconda3\lib\multiprocessing\process.py", line 110, in start
'daemonic processes are not allowed to have children'

It works fine on linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions