Based on the documentation, it is evident that for a remote task to act upon an actor, we can pass it the handle as a function attribute. However, suppose we have a class that maintains the actor handle as an attribute. Is it possible to use this handle directly in the remote task (method) without passing it in as a parameter? Note that the class is not an actor, but simply the driver program instantiating tasks. The following is the pseudo-code demonstrating this setup.
class Driver:
def __init__(self, actor_handle):
self.actor_handle = actor_handle
@ray.remote
def task(self):
do_something(self.actor_handle)