4

Is there a way to set the multiprocessing method from Python? I do not see a method in the Client() API docs of Dask.distributed that indicates how to set this property.

Update:

For example, is there:

client = Client(multiprocessing='fork')

or

client = Client(multiprocessing='spawn')

?

1 Answer 1

4

Unfortunately the multiprocessing context method is set at import time of dask.distributed. If you wanted to set this from Python you could set the config value after you import dask, but before you import dask.distributed.

import dask
dask.config.set({'distributed.worker.multiprocessing-method': 'spawn'})

from dask.distributed import Client

However it's probably more robust to just set this in your config file. See configuration documentation for the various ways to set configuration values.

Note: this is using the configuration as of dask.__version__ == '0.18.0'

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.