-
Notifications
You must be signed in to change notification settings - Fork 916
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
Switch pytest-xdist
algo to worksteal
#15207
Switch pytest-xdist
algo to worksteal
#15207
Conversation
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.
Nice! This is a new feature in pytest-xdist 3.2.0, from about a year ago (after I had last investigated the options for --dist
). https://pytest-xdist.readthedocs.io/en/latest/changelog.html#pytest-xdist-3-2-0-2023-02-07
I vaguely recall there might have been some issues caused by other --dist
options in the past. 🤔 I tried to see if I could find a past issue/PR about this but didn't see one.
Yes, |
@galipremsagar For awareness, I have prepared a series of PRs (locally) that will apply the |
Thanks @bdice ! For reference here are the time savings:
This PR:
An entire job that took 27 mins now takes just 17 mins! - 10mins time reduction. |
/merge |
That's an amazing speedup @galipremsagar! @bdice when you make your PRs, can you also double-check and align the parallelism across wheel/conda builds? For example, cuml wheel tests are currently using There are larger improvements we could make to unify the testing logic more generally, but for now I'm just focusing on the quick wins! |
Follow-up PRs across RAPIDS:
I'll work on the manual changes needed for each of these and prepare them for review. |
This PR uses the `worksteal` algorithm to accelerate parallel pytests. See rapidsai/cudf#15207. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Jake Awe (https://github.com/AyodeAwe) URL: #576
This PR uses the `worksteal` algorithm to accelerate parallel pytests. See rapidsai/cudf#15207. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) - Jake Awe (https://github.com/AyodeAwe) URL: #1355
This PR uses the `worksteal` algorithm to accelerate parallel pytests. See rapidsai/cudf#15207. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) - Jake Awe (https://github.com/AyodeAwe) URL: #708
This PR uses the `worksteal` algorithm to accelerate parallel pytests. See rapidsai/cudf#15207. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Jake Awe (https://github.com/AyodeAwe) URL: #5792
Description
This PR switches
pytest-xdist
distribution algorithm to a much more efficient algorithmworksteal
, that will assign any idle pytest worker to pickup remaining pytests.I see a 25% time savings when this switch is made locally:
Checklist