Add more user-friendly error message upon async def remote task#13915
Merged
simon-mo merged 6 commits intoray-project:masterfrom Feb 5, 2021
kathryn-zhou:async_error
Merged
Add more user-friendly error message upon async def remote task#13915simon-mo merged 6 commits intoray-project:masterfrom kathryn-zhou:async_error
async def remote task#13915simon-mo merged 6 commits intoray-project:masterfrom
kathryn-zhou:async_error
Conversation
async def remote task
simon-mo
approved these changes
Feb 4, 2021
doc/source/async_api.rst
Outdated
Comment on lines
+181
to
+187
| @ray.remote | ||
| def wrapper(): | ||
| import asyncio | ||
| asyncio.get_event_loop().run_until_complete(f()) | ||
|
|
||
| async def f(): | ||
| pass No newline at end of file |
Contributor
There was a problem hiding this comment.
can we swap the order of these functions? make it easier to read (so f isn't undefined when inside wrapper
Contributor
Author
There was a problem hiding this comment.
yep makes sense, done
fishbone
pushed a commit
to fishbone/ray
that referenced
this pull request
Feb 16, 2021
fishbone
added a commit
to fishbone/ray
that referenced
this pull request
Feb 16, 2021
…task (ray-project#13915)" This reverts commit 36d3985.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
This PR gives the user an actionable error message when they try to use
async defto create a remote task. The previous error message was not very user-friendly and did not provide actions to fix the error.Related issue number
Closes #13687
Checks
scripts/format.shto lint the changes in this PR.