Open
Description
What happened + What you expected to happen
If you set num_returns=0
, it is likely a mistake if you return a non-None object. We should print a warning message in this case to avoid confusion.
Here is likely where the warning should go (check outputs
):
Line 4381 in 24ad12d
Versions / Dependencies
N/A
Reproduction script
>>> import ray
>>> @ray.remote(num_returns=0)
... def f():
... print('hi')
... return 123
...
>>> f.remote()
(f pid=44332) hi
Issue Severity
Low: It annoys or frustrates me.