-
-
Notifications
You must be signed in to change notification settings - Fork 714
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
Share thread pool among P2P shuffle runs #7621
Conversation
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 26 files ±0 26 suites ±0 11h 14m 46s ⏱️ - 29m 13s For more details on these failures, see this check. Results for commit 11fc82b. ± Comparison against base commit 310fc95. ♻️ This comment has been updated with latest results. |
cc @wence- in case you have bandwidth for a review |
I can look tomorrow, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks fine. The diff is quite large, but it's mostly whitespace changes. The main thing is just promoting the construction of the thread pool.
if barrier_first_worker: | ||
barrier_worker = shuffles[0] | ||
else: | ||
barrier_worker = random.sample(shuffles, k=1)[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is only code movement, but I always much prefer destructuring over indexing in these situations:
(barrier_worker,) = random.sample(shuffles, k=1)
But this may not be for everyone.
This PR avoids having many thread pools when multiple shuffles are running at the same time. This also sets the foundation for sharing the thread pool with the buffers.
pre-commit run --all-files