Ray.method when is it needed?

  • None: Just asking a question out of curiosity

I see examples where actor functions are not annotated and some where they are annotated by @ray.method
So I was wondering when I should put the annotation?

The decorator is applied automatically, so you only need to add the annotation explicitly if you want to override the defaults for a particular method. For example, a common use case is to override num_returns.