user10640700
user10640700

Reputation: 31

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.

Upvotes: 1

Views: 510

Answers (2)

mdurant
mdurant

Reputation: 28684

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.

Upvotes: 0

George Bekh-Ivanov
George Bekh-Ivanov

Reputation: 11

I suppose you can just pass the IP of a server into a worker constructor, like it's done it the docs http://docs.dask.org/en/latest/setup/python-advanced.html?highlight=scheduler#worker

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

Upvotes: 0

Related Questions