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

[Core][API] get error from ObjectRef without the overhead of fetching the actual data #32817

Open
scv119 opened this issue Feb 24, 2023 · 2 comments
Labels
core Issues that should be addressed in Ray Core core-api enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks

Comments

@scv119
Copy link
Contributor

scv119 commented Feb 24, 2023

Description

user want to handle the error of ray tasks, without paying the cost of fetching the potentially large data if the task succeeded, there is no easy way to do so.

essentially we need an API like object_ref.on_error(lambda) where you only pay the cost of getting error message.

Use case

No response

@scv119 scv119 added enhancement Request for new feature and/or capability triage Needs triage (eg: priority, bug/not-bug, and owning component) core-api labels Feb 24, 2023
@hora-anyscale hora-anyscale added core Issues that should be addressed in Ray Core P1 Issue that should be fixed within a few weeks and removed triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Feb 24, 2023
@jovany-wang
Copy link
Contributor

The pain point makes sense, but I guess it might break the async-post/get-future pattern right? although I know that some other frameworks do like this.

For examples, we should answer these questions first:

  1. What's the thread that the lambda gets executed in?
  2. What happens if the object_ref gets out of the scope?

@scv119 scv119 linked a pull request Mar 7, 2023 that will close this issue
9 tasks
@rkooo567
Copy link
Contributor

I think we can follow the same API as concurrent.futures API here; I.e., supporting exceptions() API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues that should be addressed in Ray Core core-api enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks
Projects
None yet
Development

No branches or pull requests

4 participants