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

[Ray] Ray client channel get recv when first complied #2740

Merged
merged 8 commits into from
Apr 8, 2022

Conversation

Catch-Bull
Copy link
Contributor

What do these changes do?

Ray client channel get return of function recv when first complied, This PR can improve efficiency and avoid some potential hang risks

Related issue number

Fixes #xxxx

Check code requirements

  • tests added / passed (if needed)
  • Ensure all linting tests pass, see here for how to run them

Merge branch fix_channel_hang of [email protected]:ray-project/mars.git into master
https://code.alipay.com/ray-project/mars/pull_requests/36

Signed-off-by: 慕白 <[email protected]>

* fix hang

* revert

* fix import error
@qinxuye
Copy link
Collaborator

qinxuye commented Feb 23, 2022

We use the latest version of black(22.1.0) to format the code, could you please format your code first?

@qinxuye qinxuye added this to PR-In progress in v0.9 Release via automation Feb 24, 2022
@qinxuye qinxuye added this to the v0.9.0b2 milestone Feb 24, 2022
@Catch-Bull
Copy link
Contributor Author

We use the latest version of black(22.1.0) to format the code, could you please format your code first?

sure!

@qinxuye qinxuye changed the title [Mars on Ray] Ray client channel get recv when first complied [Ray] Ray client channel get recv when first complied Feb 24, 2022
@qinxuye
Copy link
Collaborator

qinxuye commented Mar 2, 2022

@chaokunyang @fyrestone This PR seems ready to review, could u plz take a look at it?

self._todo.remove(future)
self._done.put_nowait(future)

future = asyncio.ensure_future(handle_task(message, object_ref))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ensure_future will create an asyncio.Task, which may have some cost. Wonder whether we should use direct ray call for ray channel, like we did in #2690

@qinxuye qinxuye removed this from the v0.9.0b2 milestone Mar 4, 2022
@chaokunyang
Copy link
Contributor

Since #2690 break the abstraction of oscar actor pool, and is not merged until now, I think we can merge this first, and discuss whether we should use dirsct call in #2690. @Catch-Bull @qinxuye @wjsi Any ideas?

chaokunyang
chaokunyang previously approved these changes Mar 16, 2022
Copy link
Contributor

@chaokunyang chaokunyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wjsi
Copy link
Member

wjsi commented Mar 16, 2022

Since #2690 break the abstraction of oscar actor pool, and is not merged until now, I think we can merge this first, and discuss whether we should use dirsct call in #2690. @Catch-Bull @qinxuye @wjsi Any ideas?

As now intra-process actor calls are made into direct calls, and #2690 still a WIP (also seems not a very huge PR), personally I would like to merge right now. Try resolving conflicts and rerun checks.

…plied

# Conflicts:
#	mars/oscar/backends/ray/communication.py
v0.9 Release automation moved this from PR-In progress to PR-Needs review Mar 21, 2022
Copy link
Member

@wjsi wjsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@qinxuye qinxuye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qinxuye qinxuye merged commit 79dd902 into mars-project:master Apr 8, 2022
v0.9 Release automation moved this from PR-Needs review to PR-Done Apr 8, 2022
@qinxuye qinxuye added this to the v0.9.0rc2 milestone Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Mars on Ray
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

4 participants