Skip to content

No proper error message when num_return_vals is negative or not integral  #8894

@vinamrabenara

Description

@vinamrabenara

What is the problem?

Ray version and other system information (Python version, TensorFlow version, OS):
Ubuntu 18.04.4 LTS
Python 3.7.7
ray-0.9.0.dev0-cp37-cp37m-manylinux1_x86_64.whl

  • For non integral values of x, eg. x = 3.2 in the code below, ray doesn't give a proper error message. Instead the worker dies. This also happens when x is not equal to the true num return values, eg. x = 5.
    ray.exceptions.RayWorkerError: The worker died unexpectedly while executing this task.
  • For negative values of x, eg. x = -2 the kernel dies altogether.
    Aborted (core dumped)

Although one would not expect the user to enter such values. But still.

Reproduction

import ray

ray.init()

def f(a):
    return a, 2

x = <some_value>
g = ray.remote(num_return_vals = x)(f)

print(ray.get(g.remote(3)))
  • I have verified my script runs in a clean environment and reproduces the issue.
  • I have verified the issue also occurs with the latest wheels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issue moderate in impact or severitybugSomething that is supposed to be working; but isn'tgood-first-issueGreat starter issue for someone just starting to contribute to Ray

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions