简体   繁体   中英

How can I assign work to a specific cluster by using its name

I have made a local cluster with 8 worker. Now I want specific task to be submitted to specific workers. How can I do it in local cluster?

https://distributed.dask.org/en/latest/api.html#distributed.Client.run

Restrict computation to particular workers with the workers= keyword argument.

>>> c.run(os.getpid, workers=['192.168.0.100:9000',
...                           '192.168.0.101:9000'])  # doctest: +SKIP
{'192.168.0.100:9000': 1234,
 '192.168.0.101:9000': 4321}

You can also do this with resources : https://distributed.dask.org/en/latest/resources.html#example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM