-
Notifications
You must be signed in to change notification settings - Fork 287
Support reproducible ordering in Petastorm #810
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
Merged
arushi297
merged 8 commits into
uber:master
from
arushi297:arushi.arora/consistent-data-order
Aug 9, 2025
Merged
Support reproducible ordering in Petastorm #810
arushi297
merged 8 commits into
uber:master
from
arushi297:arushi.arora/consistent-data-order
Aug 9, 2025
Conversation
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
3958c2b to
87fd4f7
Compare
82479d5 to
4039b27
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #810 +/- ##
==========================================
- Coverage 86.26% 86.22% -0.05%
==========================================
Files 84 84
Lines 5090 5109 +19
Branches 790 801 +11
==========================================
+ Hits 4391 4405 +14
- Misses 560 562 +2
- Partials 139 142 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4039b27 to
ae21eb3
Compare
ae21eb3 to
9def508
Compare
…nd no seed provided
fa270df to
0f24c93
Compare
diyu2025
approved these changes
Aug 9, 2025
irasit
approved these changes
Aug 9, 2025
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 PR addresses the issue where the reader doesn't give reproducible data order for multiple workers when shuffling is disabled or seed is set. The following changes are made to address the issue:
Ventilator Queue Modifications: Each worker now has a separate ventilator queue, ensuring deterministic data ordering through a round-robin strategy and eliminating race conditions.
np.default_rng(): The switch from np.random.RandomState() to np.default_rng() provides reproducible shuffling, ensuring consistent outcomes when a seed is provided.
Result Queue Improvements: Individual result queues for each worker have been implemented. Results are collected in a round-robin manner.
The following behavior is expected as a result of this change:
Testing and Validation: Added unit tests to cover the 3 scenario stated. Also, performed experiments that confirmed that data order remains consistent when shuffling is disabled and is reproducible with a seed, improving the reliability of dataloader.