Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Datasets] Handle all Ray errors in task compute strategy. #30696

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions python/ray/data/_internal/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _apply(
# Common wait for non-data refs.
try:
results = map_bar.fetch_until_complete(refs)
except (ray.exceptions.RayTaskError, KeyboardInterrupt) as e:
except (ray.exceptions.RayError, KeyboardInterrupt) as e:
# One or more mapper tasks failed, or we received a SIGINT signal
# while waiting; either way, we cancel all map tasks.
for ref in refs:
Expand All @@ -145,7 +145,10 @@ def _apply(
for ref in refs:
try:
ray.get(ref)
except (ray.exceptions.RayTaskError, ray.exceptions.TaskCancelledError):
except ray.exceptions.RayError:
# Cancellation either succeeded, or the task had already failed with
# a different error, or cancellation failed. In all cases, we
# swallow the exception.
pass
# Reraise the original task failure exception.
raise e from None
Expand Down Expand Up @@ -418,7 +421,7 @@ def map_block_nosplit(
except Exception as err:
logger.exception(f"Error killing workers: {err}")
finally:
raise e
raise e from None


def get_compute(compute_spec: Union[str, ComputeStrategy]) -> ComputeStrategy:
Expand Down