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

Support importing directly from LightGBM model object #332

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented Jan 4, 2022

Implement treelite.Model.from_lightgbm method to import directly from a LightGBM model object.

Closes #308

@codecov
Copy link

codecov bot commented Jan 4, 2022

Codecov Report

Merging #332 (5328180) into mainline (0877988) will increase coverage by 0.00%.
The diff coverage is 85.71%.

Impacted file tree graph

@@             Coverage Diff             @@
##             mainline     #332   +/-   ##
===========================================
  Coverage       85.06%   85.06%           
  Complexity         42       42           
===========================================
  Files             108      108           
  Lines            8374     8395   +21     
  Branches           40       40           
===========================================
+ Hits             7123     7141   +18     
- Misses           1228     1231    +3     
  Partials           23       23           
Impacted Files Coverage Δ
include/treelite/frontend.h 90.00% <ø> (ø)
python/treelite/frontend.py 76.64% <75.00%> (-0.07%) ⬇️
src/c_api/c_api.cc 94.57% <100.00%> (+0.09%) ⬆️
src/frontend/lightgbm.cc 85.57% <100.00%> (+0.14%) ⬆️

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 0877988...5328180. Read the comment docs.

Copy link

@divyegala divyegala left a comment

Choose a reason for hiding this comment

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

Looks great!

@hcho3 hcho3 merged commit 3c463b4 into dmlc:mainline Jan 6, 2022
@hcho3 hcho3 deleted the import_lightgbm_obj branch January 6, 2022 20:13
This was referenced Jan 13, 2022
rapids-bot bot pushed a commit to rapidsai/cuml that referenced this pull request Jan 25, 2022
The 2.2.0 version of Treelite incorporates the following major improvements:

* dmlc/treelite#314
* dmlc/treelite#322, dmlc/treelite#327
* dmlc/treelite#325
* dmlc/treelite#332
* dmlc/treelite#330
* dmlc/treelite#333
* dmlc/treelite#334
* dmlc/treelite#304
* dmlc/treelite#335

In particular, dmlc/treelite#332, dmlc/treelite#330, dmlc/treelite#333 are required for #4447.

Requires rapidsai/integration#412.

EDIT. Using 2.2.1 patch release, to incorporate a hotfix (dmlc/treelite#340).

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

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Dante Gama Dessavre (https://github.com/dantegd)

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

* dmlc/treelite#314
* dmlc/treelite#322, dmlc/treelite#327
* dmlc/treelite#325
* dmlc/treelite#332
* dmlc/treelite#330
* dmlc/treelite#333
* dmlc/treelite#334
* dmlc/treelite#304
* dmlc/treelite#335

In particular, dmlc/treelite#332, dmlc/treelite#330, dmlc/treelite#333 are required for rapidsai#4447.

Requires rapidsai/integration#412.

EDIT. Using 2.2.1 patch release, to incorporate a hotfix (dmlc/treelite#340).

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

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Dante Gama Dessavre (https://github.com/dantegd)

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

Feature request: treelite.Model.from_lightgbm()
2 participants