简体   繁体   中英

How to change the dask scheduler and workers?

I am newbie to dask and distributed. I want to change the dask scheduler instead of localhost to use another address of a server. I didn't find how to do it in the internet.

Could you help me please ?

Thanks.

我想您可以将服务器的IP传递给工作程序构造函数,就像文档http://docs.dask.org/en/latest/setup/python-advanced.html?highlight=scheduler#worker一样

w = Worker('tcp://{your_ip_here}:8786')

From the user session's point of view, you connect to the remote Dask scheduler using the client:

client = dask.distributed.Client('tcp://machine.ip:port')

where you need to fill in the machine's address and port as appropriate. You should not be constructing a Worker in your session, I am assuming that you scheduler already has some workers set up to talk to.

Yes, there are also ways to include the default address in config files, including having the scheduler write it for you on start-up, but the XML file you mention is unlikely to be something directly read by Dask. On the other hand, whoever designed your system may have its own config layer.

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