-
Notifications
You must be signed in to change notification settings - Fork 372
better parallelism in partitioned ray executor #945
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
Draft
cyruszhang
wants to merge
18
commits into
main
Choose a base branch
from
feat/cyrusz/parallel-partition-actor-reuse
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9ee0902
add kaleido constraint
cyruszhang f517ff9
direct concurrency setting
cyruszhang 0f4eee1
Add concurrent partition processing with auto GPU detection
cyruszhang 84953b4
Fix GPU actor mode in concurrent partition tasks and auto-detect GPU …
cyruszhang 2e5f84f
Fix empty partitions causing idle GPUs during concurrent processing
cyruszhang 128d641
Fix concurrency scoping bug causing deadlock in concurrent partition …
cyruszhang 4866ecd
repartition then split for equal partitioning
cyruszhang ec44652
update design doc
cyruszhang ebd0944
Update data_juicer/core/executor/ray_executor_partitioned.py
cyruszhang 1eca46a
Update data_juicer/core/executor/ray_executor_partitioned.py
cyruszhang acd5bfc
Update data_juicer/core/executor/ray_executor_partitioned.py
cyruszhang 807e1fa
preserve natural blocks for streaming pipelining
cyruszhang 338a1ec
skip meta collection
cyruszhang f4e42c5
Remove repartition before split to preserve natural source blocks
cyruszhang 080968e
add gpu-dj mode
cyruszhang b925795
refactor: constant paths in front
cyruszhang 8e9a0a7
Merge remote-tracking branch 'origin/main' into feat/cyrusz/parallel-…
cyruszhang 81b3e3f
fix uv issue
cyruszhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| """Utility for scoping op concurrency when running partitions concurrently.""" | ||
|
|
||
|
|
||
| def scope_op_concurrency(op, max_concurrent_partitions: int) -> int: | ||
| """Returns the concurrency a single partition should use for this op. | ||
|
|
||
| When multiple partitions run concurrently, each partition should use a | ||
| fraction of the total GPU/actor resources to avoid over-subscription. | ||
|
|
||
| Args: | ||
| op: An operator instance with ``use_ray_actor()`` and ``num_proc``. | ||
| max_concurrent_partitions: How many partitions will run in parallel. | ||
|
|
||
| Returns: | ||
| The concurrency value the partition should pass through to | ||
| ``map_batches``. | ||
| """ | ||
| if not op.use_ray_actor() or not op.num_proc or op.num_proc <= 0: | ||
| return op.num_proc # CPU ops or auto-mode unchanged | ||
| return max(1, op.num_proc // max_concurrent_partitions) |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.