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

RF node queue rewrite #4125

Merged
merged 21 commits into from
Aug 13, 2021
Merged

RF node queue rewrite #4125

merged 21 commits into from
Aug 13, 2021

Conversation

RAMitchell
Copy link
Contributor

@RAMitchell RAMitchell commented Jul 29, 2021

Node queue rewrite. With this PR the max_leaves parameter works as expected and these tests are now enabled.

Benchmarks:

gbm_bench

@RAMitchell RAMitchell marked this pull request as ready for review August 3, 2021 03:44
@RAMitchell RAMitchell requested a review from a team as a code owner August 3, 2021 03:44
@RAMitchell RAMitchell changed the title [WIP] RF node queue rewrite RF node queue rewrite Aug 3, 2021
@caryr35 caryr35 added this to PR-WIP in v21.10 Release via automation Aug 4, 2021
@caryr35 caryr35 moved this from PR-WIP to PR-Needs review in v21.10 Release Aug 4, 2021
cpp/src/decisiontree/batched-levelalgo/builder_base.cuh Outdated Show resolved Hide resolved
cpp/src/decisiontree/batched-levelalgo/kernels.cuh Outdated Show resolved Hide resolved
cpp/src/decisiontree/batched-levelalgo/kernels.cuh Outdated Show resolved Hide resolved
cpp/src/decisiontree/batched-levelalgo/node.cuh Outdated Show resolved Hide resolved
tree_.size(),
node.count,
node.info.unique_id);
num_leaves_++;
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure why leaf count is incremented here. Is it utilizing the property of binary tree that number of intermediate and leaf nodes in a tree are same? If so, may be we can consider adding a line of comment to describe this clever idea :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At this point we are 'opening' a node, turning one leaf node into 2 leaf nodes, hence the +1.

Copy link
Contributor

@vinaydes vinaydes left a comment

Choose a reason for hiding this comment

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

Thanks to @venkywonka for doing another pass over the code.

cpp/src/decisiontree/batched-levelalgo/builder_base.cuh Outdated Show resolved Hide resolved
cpp/src/decisiontree/batched-levelalgo/node.cuh Outdated Show resolved Hide resolved
cpp/test/sg/decisiontree_batchedlevel_unittest.cu Outdated Show resolved Hide resolved
@github-actions github-actions bot added the Cython / Python Cython or Python issue label Aug 9, 2021
@RAMitchell RAMitchell requested a review from a team as a code owner August 11, 2021 04:44
@github-actions github-actions bot added the CMake label Aug 11, 2021
Copy link
Contributor

@vinaydes vinaydes left a comment

Choose a reason for hiding this comment

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

Changes look good to me.

@RAMitchell RAMitchell requested a review from a team as a code owner August 12, 2021 03:25
@RAMitchell
Copy link
Contributor Author

rerun tests

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (branch-21.10@e977f3e). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##             branch-21.10    #4125   +/-   ##
===============================================
  Coverage                ?   85.96%           
===============================================
  Files                   ?      232           
  Lines                   ?    18500           
  Branches                ?        0           
===============================================
  Hits                    ?    15904           
  Misses                  ?     2596           
  Partials                ?        0           
Flag Coverage Δ
dask 47.76% <0.00%> (?)
non-dask 78.56% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e977f3e...74b3bbe. Read the comment docs.

v21.10 Release automation moved this from PR-Needs review to PR-Reviewer approved Aug 13, 2021
@dantegd dantegd added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 13, 2021
@dantegd
Copy link
Member

dantegd commented Aug 13, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 387c812 into rapidsai:branch-21.10 Aug 13, 2021
v21.10 Release automation moved this from PR-Reviewer approved to Done Aug 13, 2021
vimarsh6739 pushed a commit to vimarsh6739/cuml that referenced this pull request Oct 9, 2023
Node queue rewrite. With this PR the max_leaves parameter works as expected and these tests are now enabled.

Benchmarks:

![gbm_bench](https://user-images.githubusercontent.com/7307640/127954882-6f3ed675-9410-4bbf-910f-29182901f81d.png)

Authors:
  - Rory Mitchell (https://github.com/RAMitchell)

Approvers:
  - Vinay Deshpande (https://github.com/vinaydes)
  - Venkat (https://github.com/venkywonka)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake CUDA/C++ Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants