From 5cdc46507d9006a54a025bdb0680211212fb72dc Mon Sep 17 00:00:00 2001 From: Ruofan Kong Date: Fri, 1 Oct 2021 14:16:43 -0700 Subject: [PATCH] Added the Ray logs for debugging. --- python/ray/exceptions.py | 10 ++++++++++ python/ray/serialization.py | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/python/ray/exceptions.py b/python/ray/exceptions.py index 7afed941a454..9b698e2fbe34 100644 --- a/python/ray/exceptions.py +++ b/python/ray/exceptions.py @@ -201,6 +201,16 @@ def __str__(self): @staticmethod def from_task_error(task_error): + print( + f"---------- Ray Actor Error details ----------\n" + f"function name: {task_error.function_name}, \n" + f"traceback_str: {task_error.traceback_str}, \n" + f"cause: {task_error.cause}, \n" + f"proctitle: {task_error.proctitle},\n" + f"pid: {task_error.pid},\n" + f"ip: {task_error.ip}\n" + f"---------- End of Error ----------" + ) return RayActorError(task_error.function_name, task_error.traceback_str, task_error.cause, task_error.proctitle, task_error.pid, diff --git a/python/ray/serialization.py b/python/ray/serialization.py index a7c07a1b1faa..d07c3b2b3fbe 100644 --- a/python/ray/serialization.py +++ b/python/ray/serialization.py @@ -217,6 +217,10 @@ def _deserialize_object(self, data, metadata, object_ref): data, metadata_fields) if pb_bytes: return RayError.from_bytes(pb_bytes) + logger.error( + f"Debugging: Raised the RayActorError with data: \n" + f"{data}, {metadata_fields}." + ) return RayActorError() elif error_type == ErrorType.Value("TASK_CANCELLED"): return TaskCancelledError()