---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-9-05124ba20d56> in <module>
----> 1 @ray.remote(num_return_vals=3)
2 def tuple3(one, two, three):
3 return (one, two, three)
4
5 x_ref, y_ref, z_ref = tuple3.remote("a", 1, 2.2)
~/opt/anaconda3/envs/anyscale-academy/lib/python3.7/site-packages/ray/worker.py in remote(*args, **kwargs)
1926 "max_task_retries",
1927 "max_retries",
-> 1928 ], error_string
1929
1930 num_cpus = kwargs["num_cpus"] if "num_cpus" in kwargs else None
AssertionError: The @ray.remote decorator must be applied either with no arguments and no parentheses, for example '@ray.remote', or it must be applied using some of the arguments 'num_returns', 'num_cpus', 'num_gpus', 'memory', 'object_store_memory', 'resources', 'max_calls', or 'max_restarts', like '@ray.remote(num_returns=2, resources={"CustomResource": 1})'.
I checked the documentation Ray v2.0.0.dev0 and the correct parameters should be as follows:
In part
@ray.remote()
,the argument namednum_return_vals
is different from that in the Ray Docs.When I execute the sample code given in notebook:
The following error will appear:
I checked the documentation Ray v2.0.0.dev0 and the correct parameters should be as follows: