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

Method to_bytes

python/ray/exceptions.py:30–38  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28 """Super class of all ray exception types."""
29
30 def to_bytes(self):
31 # Extract exc_info from exception object.
32 exc_info = (type(self), self, self.__traceback__)
33 formatted_exception_string = "\n".join(format_exception(*exc_info))
34 return RayException(
35 language=PYTHON,
36 serialized_exception=pickle.dumps(self),
37 formatted_exception_string=formatted_exception_string,
38 ).SerializeToString()
39
40 @staticmethod
41 def from_bytes(b):

Callers 10

msgpack_serializeFunction · 0.80
_align_bit_offsetFunction · 0.80
_serialize_to_msgpackMethod · 0.80
test_put_local_getFunction · 0.80
test_write_timeoutFunction · 0.80
readMethod · 0.80
test_put_remote_getFunction · 0.80

Calls 3

format_exceptionFunction · 0.85
RayExceptionClass · 0.85
joinMethod · 0.45

Tested by 6

test_put_local_getFunction · 0.64
test_write_timeoutFunction · 0.64
readMethod · 0.64
test_put_remote_getFunction · 0.64