Skip to content

Commit

Permalink
[Data] Hard deprecate num_blocks parameter of random_shuffle (#43341
Browse files Browse the repository at this point in the history
)

We soft deprecated the num_blocks parameter of Dataset.random_shuffle in Ray 2.9 in favor of Dataset.repartition. This PR hard deprecates the parameter for Ray 2.10.

Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
  • Loading branch information
bveeramani committed Feb 22, 2024
1 parent fa99314 commit 7c5e944
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/ray/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,11 +1044,10 @@ def random_shuffle(
""" # noqa: E501

if num_blocks is not None:
warnings.warn(
raise DeprecationWarning(
"`num_blocks` parameter is deprecated in Ray 2.9. random_shuffle() "
"does not support to change the number of output blocks. Use "
"repartition() instead.", # noqa: E501
DeprecationWarning,
)
plan = self._plan.copy()
op = RandomShuffle(
Expand Down

0 comments on commit 7c5e944

Please sign in to comment.