mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
[hotfix] Bad merge with num_return_vals (#10418)
This commit is contained in:
parent
bd92cefbf7
commit
910d5d2550
2 changed files with 5 additions and 5 deletions
|
@ -117,10 +117,10 @@ def test_invalid_arguments(shutdown_only):
|
|||
for opt in [np.random.randint(-100, -1), np.random.uniform(0, 1)]:
|
||||
with pytest.raises(
|
||||
ValueError,
|
||||
match="The keyword 'num_return_vals' only accepts 0 or a"
|
||||
match="The keyword 'num_returns' only accepts 0 or a"
|
||||
" positive integer"):
|
||||
|
||||
@ray.remote(num_return_vals=opt)
|
||||
@ray.remote(num_returns=opt)
|
||||
def g1():
|
||||
return 1
|
||||
|
||||
|
|
|
@ -1665,10 +1665,10 @@ def make_decorator(num_returns=None,
|
|||
if max_task_retries is not None:
|
||||
raise ValueError("The keyword 'max_task_retries' is not "
|
||||
"allowed for remote functions.")
|
||||
if num_return_vals is not None and (not isinstance(
|
||||
num_return_vals, int) or num_return_vals < 0):
|
||||
if num_returns is not None and (not isinstance(num_returns, int)
|
||||
or num_returns < 0):
|
||||
raise ValueError(
|
||||
"The keyword 'num_return_vals' only accepts 0 or a"
|
||||
"The keyword 'num_returns' only accepts 0 or a"
|
||||
" positive integer")
|
||||
if max_retries is not None and (not isinstance(max_retries, int)
|
||||
or max_retries < -1):
|
||||
|
|
Loading…
Add table
Reference in a new issue