ray.method# ray.method(*args, **kwargs)[source]# Annotate an actor method. @ray.remote class Foo: @ray.method(num_returns=2) def bar(self): return 1, 2 f = Foo.remote() _, _ = f.bar.remote() Parameters: num_returns – The number of object refs that should be returned by invocations of this actor method.