MCPcopy
hub / github.com/ray-project/ray / UnserializableException

Class UnserializableException

python/ray/exceptions.py:1015–1038  ·  view source on GitHub ↗

Raised when there is an error deserializing a serialized exception. This occurs when deserializing (unpickling) a previously serialized exception fails. In this case, we fall back to raising the string representation of the original exception along with its stack trace that was captured

Source from the content-addressed store, hash-verified

1013
1014@PublicAPI(stability="alpha")
1015class UnserializableException(RayError):
1016 """Raised when there is an error deserializing a serialized exception.
1017
1018 This occurs when deserializing (unpickling) a previously serialized exception
1019 fails. In this case, we fall back to raising the string representation of
1020 the original exception along with its stack trace that was captured at the
1021 time of serialization.
1022
1023 For more details and how to handle this with custom serializers, :ref:`configuring custom exception serializers <custom-exception-serializer>`
1024
1025 Args:
1026 original_stack_trace: The string representation and stack trace of the
1027 original exception that was captured during serialization.
1028 """
1029
1030 def __init__(self, original_stack_trace: str):
1031 self._original_stack_trace = original_stack_trace
1032
1033 def __str__(self):
1034 return (
1035 "Failed to deserialize exception. Refer to https://docs.ray.io/en/latest/ray-core/objects/serialization.html#custom-serializers-for-exceptions for more information.\n"
1036 "Original exception:\n"
1037 f"{self._original_stack_trace}"
1038 )
1039
1040
1041@DeveloperAPI

Callers 1

from_ray_exceptionMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…