ray-project / ray

Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
https://ray.io
Apache License 2.0
33.97k stars 5.77k forks source link

[docs] should actor methods always have num_returns value? #15818

Open cnarvaezmeli opened 3 years ago

cnarvaezmeli commented 3 years ago

I was getting an error trying to understand how to use the actor methods and I got an assertion error without much info.

Looking at the code I saw actor methods should have the num_returns attribute.

This info is not clear in the actor documentation, it seems optional.

I think we can approach this in two ways:

  1. Assertion assert "num_returns" in kwargs should be done first
  2. we can update the documentation, so users know about this.
rkooo567 commented 3 years ago

Thanks for catching this! Would you like to create a pull request to fix the issue? I agree with both suggestions you made (and + probably improving the assertion message).

richardliaw commented 3 years ago

@rkooo567 can I assign this docs change to you?

rkooo567 commented 2 years ago

Hmm idk how this is currently possible. It seems like the default value should be set to 1. I will defer the issue until repro is provided