Skip to content

Commit

Permalink
Expand supported RayError exceptions (#221)
Browse files Browse the repository at this point in the history
* Add exception `WorkerCrashedError`

* Add exception `LocalRayletDiedError`

* Add exception `TaskCancelledError`

* Add exception `ObjectLostError`

* Create abstract type `ObjectStoreError`

* Create abstract type `ObjectFetchTimedOutError`

* Create abstract type `OutOfDiskError`

* Refactor code with `ObjectContext`

* Add exception `NodeDiedError`

* Add exception `ReferenceCountingAssertionError`

* Add exception `ObjectFreedError`

* Add exception `OwnerDiedError`

* Add exception `ObjectReconstructionFailedError`

* Add exception `ObjectReconstructionFailedMaxAttemptsExceededError`

* Add exception `ObjectReconstructionFailedLineageEvictedError`

* Add exception `RuntimeEnvSetupError`

* Reference code this is based upon

* Add exception `TaskPlacementGroupRemoved`

* Add exception `ActorPlacementGroupRemoved`

* Add exception `TaskUnschedulableError`

* Add exception `ActorUnschedulableError`

* Order exceptions alphabetically

* Avoid using deserialize_error_info on exception data we have never seen

* Formatting refactoring

* Correct max retries value

* Reference support free issue

* Set project version to 0.0.4
  • Loading branch information
omus authored Nov 9, 2023
1 parent f06c1e1 commit c89cc85
Show file tree
Hide file tree
Showing 7 changed files with 617 additions and 36 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Ray"
uuid = "3f779ece-f0b6-4c4f-a81a-0cb2add9eb95"
authors = ["Beacon Biosignals, Inc"]
version = "0.0.3"
version = "0.0.4"

[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
Expand All @@ -12,6 +12,7 @@ Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
LoggingExtras = "e6f89c97-d47a-5376-807f-9c37f3926c36"
MultilineStrings = "1e8d2bf6-9821-4900-9a2f-4d87552df2bd"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
Expand All @@ -23,6 +24,7 @@ ArgParse = "1"
CxxWrap = "0.14.2"
JSON3 = "1"
LoggingExtras = "1"
MultilineStrings = "0.1.1"
julia = "1.8"
libcxxwrap_julia_jll = "0.11"

Expand Down
12 changes: 10 additions & 2 deletions src/Ray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ using Dates: Dates, DateFormat, @dateformat_str, now
using JSON3
using Logging
using LoggingExtras
using MultilineStrings
using Pkg
using Serialization: Serialization, AbstractSerializer, Serializer, deserialize,
reset_state, serialize, serialize_type, ser_version, writeheader
Expand All @@ -21,17 +22,24 @@ using Sockets: IPAddr, getipaddr
export start_worker, submit_task, @ray_import, ObjectRef

# exceptions
export RayError, RaySystemError, RayTaskError
export ActorPlacementGroupRemoved, ActorUnschedulableError, LocalRayletDiedError,
NodeDiedError, ObjectFetchTimedOutError, ObjectFreedError, ObjectLostError,
ObjectReconstructionFailedError, ObjectReconstructionFailedLineageEvictedError,
ObjectReconstructionFailedMaxAttemptsExceededError, OutOfDiskError, OwnerDiedError,
RayError, RaySystemError, RayTaskError, ReferenceCountingAssertionError,
RuntimeEnvSetupError, TaskCancelledError, TaskPlacementGroupRemoved,
TaskUnschedulableError, WorkerCrashedError

include(joinpath("ray_julia_jll", "ray_julia_jll.jl"))
using .ray_julia_jll: ray_julia_jll, ray_julia_jll as ray_jll

include("exceptions.jl")
include("constants.jl")
include("function_manager.jl")
include("runtime_env.jl")
include("remote_function.jl")
include("runtime.jl")
include("object_ref.jl")
include("exceptions.jl")
include("ray_serializer.jl")
include("object_store.jl")

Expand Down
2 changes: 2 additions & 0 deletions src/constants.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Default `max_retries` option for non-actor tasks. Ray for Python defaults to 3.
const DEFAULT_TASK_MAX_RETRIES = 0
Loading

0 comments on commit c89cc85

Please sign in to comment.