[hotfix] Bad merge with num_return_vals (#10418)

This commit is contained in:
Eric Liang 2020-08-28 22:45:35 -07:00 committed by GitHub
parent bd92cefbf7
commit 910d5d2550
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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):