Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure of an actor constructor does not prevent subsequent methods from working. #282

Closed
robertnishihara opened this issue Feb 15, 2017 · 1 comment

Comments

@robertnishihara
Copy link
Collaborator

If an actor constructor throws an exception, subsequent methods can still be called without problems. This deviates from standard Python behavior. For example, the following example runs to completion with no exceptions (an exception will be printed in the background for the __init__ task that failed, but it won't kill the script).

import ray

ray.init()

@ray.actor
class Foo(object):
  def __init__(self):
    raise Exception("The constructor failed!")
  def get_val(self):
    return 1

f = Foo()
ray.get(f.get_val())
robertnishihara pushed a commit that referenced this issue Sep 10, 2018
If an actor constructor fails, save that error and re-raise it on any subsequent attempts to interact with the actor. Related to #282 and #1093.
@robertnishihara
Copy link
Collaborator Author

Fixed by #2843.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant