distributed icon indicating copy to clipboard operation
distributed copied to clipboard

Support returning exceptions for failed tasks in `Client.gather`

Open jrbourbeau opened this issue 1 year ago • 1 comments

Currently the errors= kwarg for Client.gather supports either raising exceptions of failed tasks, or skipping them altogether. Today I ran into a case where it would have been convenient if we supported returning the actual exception that was raised in the gathered results. This is similar to what we already support in Client.run with on_error="return"

https://github.com/dask/distributed/blob/774874ebc4b1bea88d0df8288eb0ab67f39004fc/distributed/client.py#L2961-L2963

It'd be nice if we had something similar for Cilent.gather

jrbourbeau avatar Feb 14 '24 22:02 jrbourbeau

It would be extra nice if someone could pass a callable to on_error that would be called (with the exception object?) if there's an error.

ntabris avatar Feb 20 '24 21:02 ntabris