support --num-workers for dataset parallel loading#2048
Open
demouo wants to merge 3 commits into
Open
Conversation
Contributor
Author
|
Add more necessary details with 128 num-workers for speeding up dataset loading: (RolloutManager pid=2713487) [2026-06-15 15:17:01] data.py:223 - Read 3000 rows from xxx/train.parquet
(RolloutManager pid=2713487) [2026-06-15 15:17:01] data.py:273 - Loading dataset with 128 workers (3000 rows)...
(RolloutManager pid=2713487) [2026-06-15 15:17:37] data.py:288 - loading: 1000/3000 rows done, 36.0s elapsed, 27.79 rows/s
(RolloutManager pid=2713487) [2026-06-15 15:18:22] data.py:288 - loading: 2000/3000 rows done, 81.0s elapsed, 24.68 rows/s
(RolloutManager pid=2713487) [2026-06-15 15:19:13] data.py:288 - loading: 3000/3000 rows done, 131.9s elapsed, 22.74 rows/s
(RolloutManager pid=2713487) [2026-06-15 15:19:13] data.py:303 - Dataset loaded: 3000 samples, multimodal=True, 131.9s total (22.74 rows/s) |
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
Sampleis not changed.Modified
Results
For big datasets:
Old method for-loop equals to num_workers=1, loading at about 1 row per second:
The new method using ThreadPoolExecutor with num_workers=64, loading at about 28 rows per second:
Other
Loading log interval defaults to 1000 rows generally:
Usage