Skip to content
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

Fix number of rows in randomly generated lists columns #15248

Merged
merged 3 commits into from
Mar 8, 2024

Conversation

vuule
Copy link
Contributor

@vuule vuule commented Mar 7, 2024

Description

Changing single_level_mean to double introduced a rounding error in the iterative process of generating random lists columns. This PR addressed the issue by enforcing the correct row count in the root lists column.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@vuule vuule added bug Something isn't working tests Unit testing for project non-breaking Non-breaking change labels Mar 7, 2024
@vuule vuule self-assigned this Mar 7, 2024
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Mar 7, 2024
@vuule vuule marked this pull request as ready for review March 7, 2024 18:53
@vuule vuule requested a review from a team as a code owner March 7, 2024 18:53
@vuule vuule requested review from bdice, divyegala and shrshi March 7, 2024 18:53
Copy link
Contributor

@shrshi shrshi left a comment

Choose a reason for hiding this comment

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

Thank you for the bug fix, looks good to me! :)

@@ -751,13 +752,16 @@ std::unique_ptr<cudf::column> create_random_column<cudf::list_view>(data_profile

// Generate the list column bottom-up
auto list_column = std::move(leaf_column);
for (int lvl = 0; lvl < dist_params.max_depth; ++lvl) {
for (int lvl = dist_params.max_depth; lvl > 0; --lvl) {
Copy link
Contributor

@ttnghia ttnghia Mar 7, 2024

Choose a reason for hiding this comment

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

Why are we moving backward/bottom up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We've always generated these columns bottom-up, just the value of lvl did not match this. lvl is not used in the loop, outside of the new check.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah that makes sense.

cpp/benchmarks/common/generate_input.cu Outdated Show resolved Hide resolved
vuule and others added 2 commits March 7, 2024 14:59
Co-authored-by: Bradley Dice <bdice@bradleydice.com>
@vuule vuule added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Mar 7, 2024
@vuule
Copy link
Contributor Author

vuule commented Mar 8, 2024

/merge

@rapids-bot rapids-bot bot merged commit b909732 into rapidsai:branch-24.04 Mar 8, 2024
73 checks passed
@vuule vuule deleted the bug-bm-lists-num-rows branch March 22, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change tests Unit testing for project
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants