I have a class in which it has multiple fields and function. I decorate the whole class with @ray.remote because there is a function inside that class that compute some value and store it in one the class field. I have a list of that class and I want to run the function of classes in parallel. Problem is that whenever I call that function by .remote, I can no longer access classes fields. How can I access classes fields after computation done? If Ray doesn’t support it right now, Is there any workaround ?
@ray.remote
class T:
def getattr(self, attr):
return self.__dict__[attr]
t = T.remote()
await t.getattr.remote(attr)