Hey team, I am looking into ray.init
function and trying to understand how I can better integrate my app (non-ray app (dag-worker) that needs to call ray remote
functions on the remote cluster (use ray internal gRPC communication), so just simple ray-client integration). The way ray.init
works is to spin up global client and then trying to manage everything for me, but it actually fails when I do have like 100+ workers with ray.init in each of it, I am getting just a ton of random disconnects and other things. Is there a way for easier getting ServeControllerClient
instead of relying on the whole boilerplate for ray.init
? I want to have a full control of client
management, connect/disconnect, run remote calls.
The workflow that I expect to get is, while I know the deployment name, I can get the actor and then do a remote call on it. My expectation to get a handle (DeploymentHandle
) and then just call it like handle.func.remote(arg)
Current status, I was able to initiate a client like this
client = _ClientContext()
client.connect(conn_str="inference:10001", namespace=SERVE_NAMESPACE)
print(client.is_connected())
print(client.api.is_initialized())
print(client.api.list_named_actors())
print(client.client_worker.get_actor("SERVE_REPLICA::ml#LanguageDetection#dgzaYn"))
But I can’t get the actor, it gives me this error self._worker.call_retain(id) AttributeError: 'NoneType' object has no attribute 'call_retain'