Remove py_executor from run_actor_network#1023
Open
wence- wants to merge 4 commits into
Open
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
|
Marking as do not merge because I don't want to get this in to 26.06, I think. |
This was referenced May 12, 2026
madsbk
requested changes
May 13, 2026
Matt711
reviewed
May 13, 2026
mroeschke
reviewed
May 13, 2026
6b888ff to
3c3f12e
Compare
madsbk
reviewed
May 14, 2026
4ddc029 to
b1c9b22
Compare
b1c9b22 to
0f7c234
Compare
0f7c234 to
00b87e5
Compare
mroeschke
approved these changes
May 14, 2026
nirandaperera
approved these changes
May 14, 2026
Contributor
nirandaperera
left a comment
There was a problem hiding this comment.
LGTM. Thanks @wence-
madsbk
approved these changes
May 15, 2026
Contributor
Author
Yes. With 8 threads in cudf-polars performance on the hardware I ran on was within the noise compared to main. |
This, despite its name, was only ever used to offload the top-level asyncio.run to a thread so that it could run concurrently with the C++ actors. The multi-threading should belong in the application that chooses to offload work. To facilitate this, make an awaitable version of when_all to wait for a list of C++ actors. We still need a single thread to run the resulting awaitable tasks because we do so in a fresh event loop which conflicts with any event loop that the cluster manager might have.
If a python coroutine raises, the task group we are running all awaitables in cancels them all. But the C++ awaitable is really a detached task, so cancellation doesn't really make sense. To solve this, shield it from cancellation and, if we are cancelled ensure it runs to completion before raising the error.
28f910a to
19a93b4
Compare
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.
This, despite its name, was only ever used to offload the top-level asyncio.run to a thread so that it could run concurrently with the C++ actors. The multi-threading should belong in the application that chooses to offload work.
To facilitate this, make an awaitable version of when_all to wait for a list of C++ actors. We still need a single thread to run the resulting awaitable tasks because we do so in a fresh event loop which conflicts with any event loop that the cluster manager might have.
run_streaming_pipeline#855