-
Notifications
You must be signed in to change notification settings - Fork 100
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
Use DFS to get a valid but smaller new node order #570
Conversation
Resolves #571 |
Hi, thanks for submitting a pull request. The fix looks good to me. Can you add a unit test that uses a LightGBM tree with depth >32 ? |
Good idea. I've synthesised a model that reproduces - will try to get it into a unit test.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## mainline #570 +/- ##
============================================
+ Coverage 84.58% 84.66% +0.08%
============================================
Files 75 75
Lines 6547 6549 +2
Branches 528 528
============================================
+ Hits 5538 5545 +7
+ Misses 1009 1004 -5 ☔ View full report in Codecov by Sentry. |
@tmct Can you post the code that generated the model? It would be nice to not add the model file itself to the git repo. |
The model is effectively handmade outside of LightGBM using the LightGBM model format, and I can't share the specific construction code for it, sorry. I think it might be very difficult to produce a small model with this depth property through the natural training dynamics of LightGBM.... You might be able to achieve it through clever use of features such as sample weights and custom objectives... The model file above is a string less than 2kB - I tried to make it as small as possible but still failing the test. |
I see. Let's include the model file in the repo then. If you need help setting up the test, ping me. |
Thank you, will do. |
@tmct Do you mind if I take over this pull request? I'd like to include this as part of the next release of Treelite. |
@hcho3 I would be delighted if you could finish the tests for me, please. Sorry that I have not yet found the time. |
Done! |
Many thanks! |
Treelite 4.3.0 contains the following improvements: * Support XGBoost 2.1.0, including the UBJSON format (dmlc/treelite#572, dmlc/treelite#578) * [GTIL] Allow inferencing with FP32 input + FP64 model (dmlc/treelite#574). Related: triton-inference-server/fil_backend#391 * Prevent integer overflow for deep LightGBM trees by using DFS order (dmlc/treelite#570). * Support building with latest RapidJSON (dmlc/treelite#567) Authors: - Philip Hyunsu Cho (https://github.com/hcho3) Approvers: - James Lamb (https://github.com/jameslamb) - Dante Gama Dessavre (https://github.com/dantegd) URL: #5968
Please see #571 for details