Skip to content

Support setting max_rows_per_partition and report total time in pdsh benchmarks #19158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: branch-25.08
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,10 @@ def run(options: Sequence[str] | None = None) -> None:
}
if run_config.blocksize:
executor_options["target_partition_size"] = run_config.blocksize
if run_config.max_rows_per_partition:
executor_options["max_rows_per_partition"] = (
run_config.max_rows_per_partition
)
if run_config.shuffle:
executor_options["shuffle_method"] = run_config.shuffle
if run_config.broadcast_join_limit:
Expand Down
14 changes: 14 additions & 0 deletions python/cudf_polars/cudf_polars/experimental/benchmarks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class RunConfig:
shuffle: str | None = None
broadcast_join_limit: int | None = None
blocksize: int | None = None
max_rows_per_partition: int | None = None
threads: int
iterations: int
timestamp: str = dataclasses.field(
Expand Down Expand Up @@ -192,6 +193,7 @@ def from_args(cls, args: argparse.Namespace) -> RunConfig:
rapidsmpf_oom_protection=args.rapidsmpf_oom_protection,
spill_device=args.spill_device,
rapidsmpf_spill=args.rapidsmpf_spill,
max_rows_per_partition=args.max_rows_per_partition,
)

def serialize(self) -> dict:
Expand Down Expand Up @@ -229,6 +231,12 @@ def summarize(self) -> None:
f"mean time: {statistics.mean(record.duration for record in records):0.4f}"
)
print("=======================================")
total_mean_time = sum(
statistics.mean(record.duration for record in records)
for records in self.records.values()
if records
)
print(f"Total mean time across all queries: {total_mean_time:.4f} seconds")


def get_data(
Expand Down Expand Up @@ -310,6 +318,12 @@ def parse_args(args: Sequence[str] | None = None) -> argparse.Namespace:
type=int,
help="Approx. partition size.",
)
parser.add_argument(
"--max-rows-per-partition",
default=None,
type=int,
help="Approx. partition size.",
)
parser.add_argument(
"--iterations",
default=1,
Expand Down