Specialised Environments

Page tree

You can utilise Ray cluster even if your notebook or script is written with Dask and Xarray. 

Ray provides a scheduler for Dask (i.e. dask-on-ray) which allows you to build data analyses using Dask’s collections and execute the underlying tasks on a Ray cluster.

You can set up either a local Ray cluster or a pre-defined cluster across multiple nodes by following the instruction.

To enable dask-on-ray, simply call the helper  "enable_dask_on_ray()" after initialising the ray cluster.

import ray
from ray.util.dask import ray_dask_get, enable_dask_on_ray, disable_dask_on_ray

ray.init() # local Ray cluster.
#ray.init(address='auto') # connect to the pre-defined Ray cluster.

enable_dask_on_ray()

For more details on using Dask on Ray, please refer to here.

You should not use the Dask.distributed client together with enable_dask_on_ray.






  • No labels