distributed
distributed copied to clipboard
Support returning exceptions for failed tasks in `Client.gather`
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
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.