ray.util.dask.RayDaskCallback#

class ray.util.dask.RayDaskCallback(*args: Any, **kwargs: Any)[source]#

Bases: Callback

Extends Dask’s Callback class with Ray-specific hooks. When instantiating or subclassing this class, both the normal Dask hooks (e.g. pretask, posttask, etc.) and the Ray-specific hooks can be provided.

See dask.callbacks.Callback for usage.

Caveats: Any Dask-Ray scheduler must bring the Ray-specific callbacks into context using the local_ray_callbacks context manager, since the built-in local_callbacks context manager provided by Dask isn’t aware of this class.

Methods

Attributes

ray_active