Adding actors dynamically without cluster restart

Hello,

Is there a way to add actors on demand without the need of modifying code and restart whole ray cluster?

Assuming we be provided a ray class (either a string or a python file) following ray handles (remote, get, etc.) wherever appropriate, can this be deployed programatically?

Thank you in advance!

cc @simon-mo I think this request sounds similar to Serve? Can you address his question?

Yep. @kishansairam9 please checkout Ray Serve, we have this functionality to help you scale out the actor replicas at runtime.

Thank you for your response, but I am looking for different use case than scaling replica count of an Actor. My use case is to add or register a new (entirely new, not a replica) actor on demand.

As in if we get a request providing class with ray hooks, can I add that new class as a Ray Actor?

@simon-mo does ray support add or register a new (entirely new, not a replica) actor on demand?

@kishansairam9 thanks for dropping by the Ray forums!

Hmm, why do you need to restart the cluster? With some caveats, you should be able to just run ray.remote(NewClass) and then instantiate that actor on your cluster.

Right, my bad, we can connect to ray cluster which has already started in init and use it as you mentioned.

Thanks