[docs] Add get_actor as top level API (#15484)

This commit is contained in:
Ian Rodney 2021-05-04 12:25:53 -07:00 committed by GitHub
parent 15da948214
commit 86cd358f1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View file

@ -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

View file

@ -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.