Anton Babkin
Anton Babkin

Reputation: 645

dask-distributed configuration file for dashboard_address

Is it possible to specify default port for Dask dashboard in a YAML config file? So that SSH tunneling can be set for a non-random port. I know I can do it like so:

cluster = LocalCluster(dashboard_address='localhost:8899')

But can this default be specified in a config file?

I tried

dask.config.set({'distributed.dashboard_address': 'localhost:8899'})

but new clusters would still give warning about default port 8787 being occupied (I have RStudio server running on that port) and serve dashboard on a random port.

Upvotes: 1

Views: 500

Answers (1)

mdurant
mdurant

Reputation: 28673

Using dask.config.set will change the value only within the current session, not update the config files. To set values that get seen by all Dask processes, see this section of the docs. The keys in the YAML file are the same as the argument/keys you are trying to use. Obviously, all machines where you want to set a default must have the config file present in the location Dask expects to look (e.g., ~/.config/dask/*.yaml)

As that page goes on to describe, you can also use environment variables with special names, if that is easier for you to set up.

Upvotes: 1

Related Questions