From 5f43906b5da086bceb3fc5aedc388b0bcdc2bf65 Mon Sep 17 00:00:00 2001 From: Alyetama <56323389+Alyetama@users.noreply.github.com> Date: Wed, 4 May 2022 00:44:31 -0400 Subject: [PATCH] Fix broken documentation URL (#24437) The link to the documentation to troubleshoot TypeError: Could not serialize the function ... is broken. This PR fixes the link by replacing it with the correct URL. --- python/ray/_private/function_manager.py | 2 +- python/ray/_raylet.pyx | 2 +- python/ray/remote_function.py | 2 +- python/ray/tests/test_traceback.py | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python/ray/_private/function_manager.py b/python/ray/_private/function_manager.py index ad8a9957e..ac367bbb0 100644 --- a/python/ray/_private/function_manager.py +++ b/python/ray/_private/function_manager.py @@ -466,7 +466,7 @@ class FunctionActorManager: msg = ( "Could not serialize the actor class " f"{actor_creation_function_descriptor.repr}. " - "Check https://docs.ray.io/en/master/serialization.html#troubleshooting " # noqa + "Check https://docs.ray.io/en/master/ray-core/objects/serialization.html#troubleshooting " # noqa "for more information." ) raise TypeError(msg) from e diff --git a/python/ray/_raylet.pyx b/python/ray/_raylet.pyx index 72ae447a2..e1be9aa2b 100644 --- a/python/ray/_raylet.pyx +++ b/python/ray/_raylet.pyx @@ -418,7 +418,7 @@ cdef prepare_args_internal( "Could not serialize the argument " f"{repr(arg)} for a task or actor " f"{function_descriptor.repr}. Check " - "https://docs.ray.io/en/master/serialization.html#troubleshooting " # noqa + "https://docs.ray.io/en/master/ray-core/objects/serialization.html#troubleshooting " # noqa "for more information.") raise TypeError(msg) from e metadata = serialized_arg.metadata diff --git a/python/ray/remote_function.py b/python/ray/remote_function.py index 6d32ec4dc..2411e6fcd 100644 --- a/python/ray/remote_function.py +++ b/python/ray/remote_function.py @@ -204,7 +204,7 @@ class RemoteFunction: msg = ( "Could not serialize the function " f"{self._function_descriptor.repr}. Check " - "https://docs.ray.io/en/master/serialization.html#troubleshooting " + "https://docs.ray.io/en/master/ray-core/objects/serialization.html#troubleshooting " # noqa "for more information." ) raise TypeError(msg) from e diff --git a/python/ray/tests/test_traceback.py b/python/ray/tests/test_traceback.py index abf2a402c..0f80781aa 100644 --- a/python/ray/tests/test_traceback.py +++ b/python/ray/tests/test_traceback.py @@ -319,10 +319,10 @@ RuntimeError: Failed to unpickle serialized exception""" def test_serialization_error_message(shutdown_only): - expected_output_task = """Could not serialize the argument for a task or actor test_traceback.test_serialization_error_message..task_with_unserializable_arg. Check https://docs.ray.io/en/master/serialization.html#troubleshooting for more information.""" # noqa - expected_output_actor = """Could not serialize the argument for a task or actor test_traceback.test_serialization_error_message..A.__init__. Check https://docs.ray.io/en/master/serialization.html#troubleshooting for more information.""" # noqa - expected_capture_output_task = """Could not serialize the function test_traceback.test_serialization_error_message..capture_lock. Check https://docs.ray.io/en/master/serialization.html#troubleshooting for more information.""" # noqa - expected_capture_output_actor = """Could not serialize the actor class test_traceback.test_serialization_error_message..B.__init__. Check https://docs.ray.io/en/master/serialization.html#troubleshooting for more information.""" # noqa + expected_output_task = """Could not serialize the argument for a task or actor test_traceback.test_serialization_error_message..task_with_unserializable_arg. Check https://docs.ray.io/en/master/ray-core/objects/serialization.html#troubleshooting for more information.""" # noqa + expected_output_actor = """Could not serialize the argument for a task or actor test_traceback.test_serialization_error_message..A.__init__. Check https://docs.ray.io/en/master/ray-core/objects/serialization.html#troubleshooting for more information.""" # noqa + expected_capture_output_task = """Could not serialize the function test_traceback.test_serialization_error_message..capture_lock. Check https://docs.ray.io/en/master/ray-core/objects/serialization.html#troubleshooting for more information.""" # noqa + expected_capture_output_actor = """Could not serialize the actor class test_traceback.test_serialization_error_message..B.__init__. Check https://docs.ray.io/en/master/ray-core/objects/serialization.html#troubleshooting for more information.""" # noqa ray.init(num_cpus=1) lock = threading.Lock()