Skip to content

[Data] Expose RAY_DATA_HASH_SHUFFLE_MAP_TASK_TARGET_INPUT_BYTES in Data context - #65103

Open
owenowenisme wants to merge 3 commits into
ray-project:masterfrom
owenowenisme:owenowenisme/Discussion-of-config-for-pre-map-merge
Open

[Data] Expose RAY_DATA_HASH_SHUFFLE_MAP_TASK_TARGET_INPUT_BYTES in Data context#65103
owenowenisme wants to merge 3 commits into
ray-project:masterfrom
owenowenisme:owenowenisme/Discussion-of-config-for-pre-map-merge

Conversation

@owenowenisme

@owenowenisme owenowenisme commented Jul 29, 2026

Copy link
Copy Markdown
Member

Description

Set the default map task target input size to 128 MiB (previously hard-coded to 1 GiB). When the map side is CPU-intensive and CPU resources are abundant, a 1 GiB threshold caps parallelism: each node buffers a full 1 GiB before launching a single map task, leaving cores idle while the buffer fills. 128 MiB matches target_max_block_size, giving shuffle map tasks the same input granularity as other Ray Data tasks. Users can still config this with data context.

Related issues

Link related issues: "Fixes #1234", "Closes #1234", or "Related to #1234".

Additional information

Optional: Add implementation details, API changes, usage examples, screenshots, etc.

Signed-off-by: You-Cheng Lin <mses010108@gmail.com>
@owenowenisme
owenowenisme requested a review from a team as a code owner July 29, 2026 09:02

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the pre_map_merge_threshold parameter in ShuffleMapOp with a context-based configuration hash_shuffle_map_task_target_input_bytes (defaulting to 128 MiB), allowing dynamic configuration of the target input size for hash-shuffle map tasks. The review feedback suggests using pytest's monkeypatch fixture in the new test instead of a manual try...finally block to restore the context state, which is cleaner and more idiomatic.

Comment thread python/ray/data/tests/test_hash_shuffle_v2.py Outdated
Signed-off-by: You-Cheng Lin <mses010108@gmail.com>
@owenowenisme owenowenisme added data Ray Data-related issues go add ONLY when ready to merge, run all tests labels Jul 29, 2026
Signed-off-by: You-Cheng Lin <mses010108@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Ray Data-related issues go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ray fails to serialize self-reference objects

1 participant