Repository navigation
test: isolate cache dirs for tests running in parallel - #952
Open
deependujha wants to merge 7 commits into
Open
deependujha wants to merge 7 commits into
deependujha wants to merge 7 commits into
Conversation
deependujha
requested review from
bhimrazy,
dhedey,
pwgardipee and
tchaton
as code owners
October 22, 2026 10:17
deependujha
marked this pull request as draft
October 22, 2026 10:17
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #952 +/- ##
=====================================
Coverage 82% 82%
=====================================
Files 72 72
Lines 16445 16445
=====================================
+ Hits 13505 13507 +2
+ Misses 2940 2938 -2 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Static review found no unresolved correctness issues in cache isolation or the updated tests; automated tests were not run.
No open issues 🎉
What changed in this PR
This PR addresses the parallel-test cache collisions described in #813 and broadens #943’s targeted approach to isolate cache directories across the test suite.
Changes:
- Adds per-test cache paths through environment variables inherited by spawned workers.
- Resolves
LITDATA_CACHE_DIRat call time instead of import time. - Removes shared-cache cleanup and worker grouping, and updates cache-path tests.
| File | Description |
|---|---|
| tests/utilities/test_dataset_utilities.py | Tests environment overrides without module reloads and isolates cloud-default checks. |
| tests/streaming/test_parquet.py | Removes shared-cache cleanup usage and updates default-path assertions. |
| tests/processing/test_data_processor.py | Adds coverage for optimizer cache defaults and environment overrides. |
| tests/conftest.py | Introduces automatic per-test cache isolation and removes shared-cache cleanup and grouping. |
| src/litdata/utilities/dataset_utilities.py | Reads the cache-directory environment override at call time. |
| src/litdata/constants.py | Removes the import-time cache override constant. |
| pyproject.toml | Removes the obsolete cache-sharing marker registration. |
Review effort: Balanced
2 of 4 tasks
This branch has not been deployed
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.
Before submitting
What does this PR do?
Fixes #813
closes #943
thanks @kostasrigatos
Instead of patching cache env vars test by test, every test now gets its own cache dirs, so tests can't delete each other's files, even on parallel xdist workers.
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃