diff --git a/doc/source/package-ref.rst b/doc/source/package-ref.rst index 71c6f11bb..6a4013e69 100644 --- a/doc/source/package-ref.rst +++ b/doc/source/package-ref.rst @@ -64,6 +64,14 @@ ray.cancel .. autofunction:: ray.cancel +.. _ray-get_actor-ref: + + +ray.get_actor +~~~~~~~~~~~~~~~ + +.. autofunction:: ray.get_actor + .. _ray-get_gpu_ids-ref: ray.get_gpu_ids diff --git a/python/ray/worker.py b/python/ray/worker.py index d3879f73c..35f15ef8d 100644 --- a/python/ray/worker.py +++ b/python/ray/worker.py @@ -1614,10 +1614,11 @@ def wait(object_refs, *, num_returns=1, timeout=None, fetch_local=True): @client_mode_hook def get_actor(name): - """Get a handle to a detached actor. + """Get a handle to a named actor. - Gets a handle to a detached actor with the given name. The actor must - have been created with Actor.options(name="name").remote(). + Gets a handle to an actor with the given name. The actor must + have been created with Actor.options(name="name").remote(). This + works for both detached & non-detached actors. Returns: ActorHandle to the actor.