Skip to content

Commit

Permalink
[data][tests] Fix sort.py test ray-project#42264
Browse files Browse the repository at this point in the history
Fix test script for 100TB sort. Verified fix locally.

Closes ray-project#39527.

Signed-off-by: Stephanie Wang <[email protected]>
  • Loading branch information
stephanie-wang authored Jan 9, 2024
1 parent 08c0202 commit 601709e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions release/nightly_tests/dataset/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ def make_block(count: int, row_size_bytes: int) -> Block:
print("Using polars for sort")
ctx = DataContext.get_current()
ctx.use_polars = True
ctx = DataContext.get_current()
if args.limit_num_blocks is not None:
DataContext.get_current().set_config(
"debug_limit_shuffle_execution_to_num_blocks", args.limit_num_blocks
)

num_partitions = int(args.num_partitions)
partition_size = int(float(args.partition_size))
Expand All @@ -130,14 +135,9 @@ def run_benchmark(args):
)

if args.shuffle:
ds = ds.random_shuffle(
_debug_limit_shuffle_execution_to_num_blocks=args.limit_num_blocks
)
ds = ds.random_shuffle()
else:
ds = ds.sort(
key="c_0",
_debug_limit_shuffle_execution_to_num_blocks=args.limit_num_blocks,
)
ds = ds.sort(key="c_0")
exc = None
try:
ds = ds.materialize()
Expand Down

0 comments on commit 601709e

Please sign in to comment.