Repository navigation
[Data] Fuse shuffle map with map op - #68433
sampan-s-nayak merged 2 commits into
Conversation
Signed-off-by: You-Cheng Lin <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request enables operator fusion for disk-shuffle map operators by removing the runtime environment configuration for Polars thread capping and instead setting it directly within the tasks via cap_polars_threads(). It also updates the operator fusion rules to handle disk-shuffle writers as plain task-pool maps and adds corresponding tests. The review feedback highlights a critical bug in operator_fusion.py where a list of input dependencies is incorrectly passed to AbstractMap instead of a single logical operator, which would cause type mismatches. Additionally, minor typos in the docstring of cap_polars_threads should be corrected.
Signed-off-by: You-Cheng Lin <[email protected]>
| def test_map_between_disk_shuffles_fuses_into_first_reduce( | ||
| ray_start_regular_shared_2_cpus, restore_data_context | ||
| ): | ||
| """Back-to-back disk shuffles with a map between collapse to two task |
There was a problem hiding this comment.
just a thought I had no action required for now, when fusing two shuffles we can support optimisations like skipping partitioning (if keys are same) as the data would already be partitioned from previous shuffles map?
…nto releases/2.61.0 (#68472) ## Description Cherry-pick of #68433 (`1729626bbb`) onto `releases/2.61.0`. Lets the upstream read or map fuse into the disk-shuffle writer, and sets the polars thread limit inside the task rather than through the runtime env. The pick applied without conflicts. Seven master commits that touch the same files are not on the release branch (#67143, #68158, #68202 and its revert #68383, #68319, #67570, #68118), so the picked files differ from master in five places. Reviewers from Data, please confirm none of those is a prerequisite. ## Testing Ran locally against the `releases/2.61.0` wheel (`7c8ca5ea51`) with the picked files overlaid: `test_hash_shuffle_v2.py`, `test_operator_fusion.py` and `test_execution_optimizer_advanced.py`, 232 passed, 2 skipped. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: You-Cheng Lin <[email protected]> Signed-off-by: elliot-barn <[email protected]> Co-authored-by: You-Cheng Lin <[email protected]>
Description
Lets the upstream read or map fuse into the disk-shuffle writer, so one task reads, maps, partitions and writes its shuffle file.
Also set polars max threads in task instead of runtime env so shuffle map can fuse with other map op (or it'll blocked by different runtime env )