Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/ray/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions python/ray/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1665,10 +1665,10 @@ def decorator(function_or_class):
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):
Expand Down