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

Handle the case where left_categories={} #303

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented Jul 20, 2021

The bug was revealed in rapidsai/cuml#4041. When the user is iteratively building a model using the model builder class and specifies a categorical split with an empty value {} for left_categories, Treelite throws an exception

nid out of range

This PR ensures that Treelite can represent categorical splits with empty left categories.

@codecov
Copy link

codecov bot commented Jul 20, 2021

Codecov Report

Merging #303 (08960c6) into mainline (c9766ca) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff               @@
##             mainline     #303      +/-   ##
==============================================
- Coverage       85.18%   85.16%   -0.03%     
  Complexity         46       46              
==============================================
  Files             108      108              
  Lines            8156     8161       +5     
  Branches           50       50              
==============================================
+ Hits             6948     6950       +2     
- Misses           1183     1186       +3     
  Partials           25       25              
Impacted Files Coverage Δ
include/treelite/tree.h 97.77% <ø> (ø)
include/treelite/tree_impl.h 90.12% <100.00%> (+0.08%) ⬆️
tests/cpp/test_serializer.cc 100.00% <100.00%> (ø)
include/treelite/typeinfo.h 86.66% <0.00%> (-3.34%) ⬇️
src/threading_utils/parallel_for.h 97.61% <0.00%> (-2.39%) ⬇️

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 c9766ca...08960c6. Read the comment docs.

@hcho3 hcho3 merged commit 59b08d2 into dmlc:mainline Sep 17, 2021
@hcho3 hcho3 deleted the handle_empty_left_categories branch September 17, 2021 11:10
This was referenced Sep 20, 2021
rapids-bot bot pushed a commit to rapidsai/cuml that referenced this pull request Sep 23, 2021
The 2.1.0 version of Treelite incorporates the following major improvements:

* dmlc/treelite#311
* dmlc/treelite#302
* dmlc/treelite#303
* dmlc/treelite#296

In particular, dmlc/treelite#311 is a critical follow-up to #4191 and addresses a performance regression.

Requires rapidsai/integration#353

Authors:
  - Philip Hyunsu Cho (https://github.com/hcho3)

Approvers:
  - Jordan Jacobelli (https://github.com/Ethyling)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #4220
vimarsh6739 pushed a commit to vimarsh6739/cuml that referenced this pull request Oct 9, 2023
The 2.1.0 version of Treelite incorporates the following major improvements:

* dmlc/treelite#311
* dmlc/treelite#302
* dmlc/treelite#303
* dmlc/treelite#296

In particular, dmlc/treelite#311 is a critical follow-up to rapidsai#4191 and addresses a performance regression.

Requires rapidsai/integration#353

Authors:
  - Philip Hyunsu Cho (https://github.com/hcho3)

Approvers:
  - Jordan Jacobelli (https://github.com/Ethyling)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4220
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.

1 participant