ray.serve.get_app_handle(name: str) DeploymentHandle[source]#

Get a handle to the application’s ingress deployment by name.


name – Name of application to get a handle to.


RayServeException – If no Serve controller is running, or if the application does not exist.

import ray
from ray import serve

def f(val: int) -> int:
    return val * 2

serve.run(f.bind(), name="my_app")
handle = serve.get_app_handle("my_app")
assert handle.remote(3).result() == 6

PublicAPI (alpha): This API is in alpha and may change before becoming stable.