chore(tests): speed up streaming pytest suite - #856
Open
tchaton wants to merge 3 commits into
Open
Conversation
Collapse redundant num_workers=2 parallel-matrix cells onto a single-process path (keep one MP cell per behavior), reuse shared Cache dirs across params, shrink dataloader fixtures, replace fixed sleeps with polls/backdated clocks, and raise Ubuntu xdist workers to 4. Co-authored-by: Cursor <cursoragent@cursor.com>
for more information, see https://pre-commit.ci
Keep every resume/rng/state matrix cell on num_workers=2 (or the original 0/2 grid). Speedups remain shared Cache reuse, smaller dataloader fixtures, sleep→poll/clock backdating, and Ubuntu xdist=4 — not coverage cuts. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #856 +/- ##
===================================
- Coverage 81% 81% -0%
===================================
Files 56 56
Lines 8389 8389
===================================
- Hits 6794 6793 -1
- Misses 1595 1596 +1 🚀 New features to boost your workflow:
|
deependujha
reviewed
Jul 25, 2026
| --ignore=tests/processing \ | ||
| --ignore=tests/raw \ | ||
| -n 2 --dist=loadgroup --cov=litdata --durations=0 --timeout=120 --capture=no --verbose | ||
| -n "${XDIST_WORKERS}" --dist=loadgroup --cov=litdata --durations=0 --timeout=120 --capture=no --verbose |
Collaborator
There was a problem hiding this comment.
we can also try standalone script for running tests
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.
Summary
Speed up the streaming pytest suite without cutting resume/MP regression coverage.
Safe speedups (kept):
(len1, len2)inside each xdist workersleep(1/2)waits with polls / backdated clocks-n 4on Linux only (macOS/Windows stay at 2)Coverage (restored):
num_workers=[0,2]grids for RNG + dataloader state testslength × resume × shufflematrices for partial/complete resume stay onnum_workers=2every cellnum_workers=0(no DataLoader workers are used there)Test plan