[Data] repartition() warns that shuffle is ignored before rejecting the same argument
Maintainers usually reply within 2 days
@cryptus-neoxys is already working on this.
Since Nov 10, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- data-engineering
Research direction
Start with Dataset.repartition() and the target_num_rows_per_block validation described in the issue; run the minimal reproduction to confirm the warning and error. Add a regression test showing that shuffle=True raises the expected ValueError without emitting the contradictory warning.
Written by the indexing model from the issue text.
Description
Problem / Description
Dataset.repartition() gives contradictory feedback when target_num_rows_per_block is used together with shuffle=True.
The method first emits:
UserWarning: `shuffle` is ignored when `target_num_rows_per_block` is set.
but then immediately raises:
ValueError: `shuffle` must be False when `target_num_rows_per_block` is set.
This makes the public API contract unclear: the warning tells users that the argument is accepted but ignored, while the validation rejects the same configuration.
The current repartition() documentation describes target_num_rows_per_block as exclusive with shuffle, so the ValueError behavior appears consistent with the documented contract.
Minimal Reproduction
import warnings
import ray
ray.init(include_dashboard=False, num_cpus=2)
ds = ray.data.range(10)
with warnings.catch_warnings(record=True) as caught:
warnings.simplefilter("always")
try:
ds.repartition(
target_num_rows_per_block=3,
shuffle=True,
)
except Exception as e:
print(type(e).__name__, str(e))
for warning in caught:
print(type(warning.message).__name__, str(warning.message))
Output:
ValueError `shuffle` must be False when `target_num_rows_per_block` is set.
UserWarning `shuffle` is ignored when `target_num_rows_per_block` is set.
Expected behavior
repartition() should communicate one consistent contract for this argument combination.
Since target_num_rows_per_block is documented as exclusive with shuffle, passing shuffle=True should raise the existing ValueError without first emitting a warning that says the argument will be ignored.
Proposal
Remove the shuffle ignored warning from the target_num_rows_per_block branch and keep the existing validation:
if target_num_rows_per_block is not None and shuffle:
raise ValueError(
"`shuffle` must be False when `target_num_rows_per_block` is set."
)
Add a regression test confirming that this invalid argument combination raises the expected ValueError without emitting the contradictory warning.
- Dominant language
- Python
- Stars
- 44.3k
- Forks
- 8.3k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 414
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ray-project/ray
-
[Core] Deprecated(error=True) raises only on the first call; later calls run the removed APIPossibly taken @wguo7 claimed this 3 days ago. Opencommunity-backlog core rllib stability
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ray-project/ray#67965 ·
Maintainers usually reply within 2 days
-
[Tune] add_evaluated_trials drops ERROR trials without a metricPossibly taken @MakerFlyFly claimed this 11 days ago. Opencommunity-backlog stability tune
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ray-project/ray#67653 ·
Maintainers usually reply within 2 days
-
[Data] object-store SHUFFLE_V2 map/reduce tasks ignore label_selectorPossibly taken @viiccwen claimed this 29 days ago. Openbug community-backlog data stability triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ray-project/ray#66935 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
[RLlib] MultiAgentEpisode marks the episode terminated when a new agent joins on the step the last registered agent terminates (despite __all__=False)Possibly taken @Akshaay1 claimed this 32 days ago. Openbug community-backlog rllib stability triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ray-project/ray#66781 · 2 comments · 5 reactions ·
Maintainers usually reply within 2 days
-
[core][gcs] HandleReportAutoscalingState success callback reads a stack local after return (stack-use-after-return)Possibly taken @LuciferYang claimed this 52 days ago. Opencommunity-backlog core stability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ray-project/ray#66333 ·
Maintainers usually reply within 2 days
Similar issues
-
release
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
MichaelYcJo/SpecSeal#1535 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
valentinfrlch/ha-llmvision#769 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 75/100
daniel-ospina/tortoise#11937 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue help wanted python up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
andrewsiah/agentswarm-data-tasks#238 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
cadence-workflow/cadence-ai-samples#175 ·
Maintainers usually reply within 1 day