Skip to content

Closes #3570: Update groupby_benchmark - #4613

Merged
ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:3570_Update_groupby_benchmark
Jul 10, 2025
Merged

ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:3570_Update_groupby_benchmark

Conversation

@ajpotts

@ajpotts ajpotts commented Jun 13, 2025

Copy link
Copy Markdown
Contributor

PR: Refactor groupby_benchmark.py for Consistency and Correctness-Only Support

This PR refactors the groupby_benchmark.py benchmark to align with Arkouda’s standardized benchmarking style and enable correctness-only testing.

✅ Key Updates

  • Correctness-Only Mode Support (pytest.correctness_only=True)
    Automatically reduces problem size to 10**4 for fast validation and CI efficiency.

  • Accurate Byte Tracking for Throughput Reporting
    Benchmarked function now returns the number of bytes processed, enabling consistent and accurate GiB/sec transfer rate metrics.

  • Helper Function Enhanced
    generate_arrays() now accepts a target problem size and handles all dtype/structure combinations with accurate byte counting.

  • Consistent Benchmark Wrapping
    GroupBy creation logic is now wrapped in a function (create_groupby) that returns transfer volume, mirroring the approach used in aggregate_benchmark.py.

🔧 Structural Improvements

  • Cleaner logic for mixed-type input
  • Explicit N management using cfg["numLocales"]
  • Unified naming (numBytes, totalbytes, N, etc.)

This update ensures that ak.GroupBy creation benchmarks are reliable, reproducible, and compatible with future correctness/NumPy testing workflows.

Closes #3570: Update groupby_benchmark

@ajpotts
ajpotts force-pushed the 3570_Update_groupby_benchmark branch from adfe8ce to 19a04a4 Compare June 18, 2025 12:22
@ajpotts
ajpotts marked this pull request as ready for review June 22, 2025 13:23
@ajpotts
ajpotts requested a review from vasslitvinov June 25, 2025 15:55

@vasslitvinov vasslitvinov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding skipif_if_numpy and benchmark.extra_info["backend"] = "Arkouda" ?

Comment thread benchmark_v2/groupby_benchmark.py Resolved
Comment thread benchmark_v2/groupby_benchmark.py Resolved
@ajpotts
ajpotts force-pushed the 3570_Update_groupby_benchmark branch from 662adf3 to c22b848 Compare July 7, 2025 18:01
@ajpotts
ajpotts force-pushed the 3570_Update_groupby_benchmark branch from c22b848 to 711a81c Compare July 10, 2025 13:41

@drculhane drculhane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks straightforward. Good improvements.

@jaketrookman jaketrookman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@ajpotts
ajpotts added this pull request to the merge queue Jul 10, 2025
Merged via the queue into Bears-R-Us:master with commit 6d3a9e6 Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update groupby_benchmark

4 participants