Skip to content

Commit

Permalink
Revert "Remove AsyncioActorExit"
Browse files Browse the repository at this point in the history
This reverts commit 516bf49.

Signed-off-by: Chi-Sheng Liu <[email protected]>
  • Loading branch information
MortalHappiness committed Mar 4, 2025
1 parent 08fbd01 commit b845581
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/source/ray-core/api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Exceptions
ray.exceptions.ActorDiedError
ray.exceptions.ActorUnschedulableError
ray.exceptions.ActorUnavailableError
ray.exceptions.AsyncioActorExit
ray.exceptions.LocalRayletDiedError
ray.exceptions.WorkerCrashedError
ray.exceptions.TaskPlacementGroupRemoved
Expand Down
3 changes: 3 additions & 0 deletions python/ray/_raylet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ from ray.exceptions import (
OutOfDiskError,
GetTimeoutError,
TaskCancelledError,
AsyncioActorExit,
PendingCallsLimitExceeded,
RpcError,
ObjectRefStreamEndOfStreamError,
Expand Down Expand Up @@ -1957,6 +1958,8 @@ cdef void execute_task(
(ray._private.worker.global_worker
.debugger_breakpoint) = b""
task_exception = False
except AsyncioActorExit as e:
exit_current_actor_if_asyncio()
except Exception as e:
is_retryable_error[0] = determine_if_retryable(
should_retry_exceptions,
Expand Down
8 changes: 8 additions & 0 deletions python/ray/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,13 @@ class PlasmaObjectNotAvailable(RayError):
pass


@PublicAPI
class AsyncioActorExit(RayError):
"""Raised when an asyncio actor intentionally exits via exit_actor()."""

pass


@PublicAPI
class RuntimeEnvSetupError(RayError):
"""Raised when a runtime environment fails to be set up.
Expand Down Expand Up @@ -909,6 +916,7 @@ class RayCgraphCapacityExceeded(RaySystemError):
ObjectReconstructionFailedLineageEvictedError,
OwnerDiedError,
GetTimeoutError,
AsyncioActorExit,
RuntimeEnvSetupError,
TaskPlacementGroupRemoved,
ActorPlacementGroupRemoved,
Expand Down
1 change: 1 addition & 0 deletions python/ray/includes/common.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ from ray.exceptions import (
OutOfDiskError,
GetTimeoutError,
TaskCancelledError,
AsyncioActorExit,
PendingCallsLimitExceeded,
RpcError,
ObjectRefStreamEndOfStreamError,
Expand Down

0 comments on commit b845581

Please sign in to comment.