-
Notifications
You must be signed in to change notification settings - Fork 276
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
loading lightgbm.basic.Booster #539
Comments
Right now we only support direct conversion from LGBM Classifier/Ranker/Regressor, so the error you get is expected. I'm not sure how much additional effort it would be to support Other thoughts @interesaaat ? |
Hey! I think it should be doable. I saw that we get all infos from the @marsupialtail I think it is a matter of adding LightGBM booster among the supported operators. Do you want to give it a shot? |
If you point me to a couple places in the code you think would serve as a good reference, I can try to work on this. |
@marsupialtail - PR #173 (LGBMRanker) is a good starting point! For Booster, you'll probably need to add a separate converter function in I'm not sure what else will be needed, but as Matteo showed above, the information will be there in line 99. Please reach out if you get stuck! |
I made a PR. Please review. Thanks. |
You can create sklearn object from your booster. Something like that:
|
Is there a way to directly convert a LightGBM booster object instead of using the sklearn API?
With the sklearn API for lgb, I think you can only load file to a booster object, and I'm not sure how to initialize a lgb regressor from a booster object.
Currently when I try convert booster object directly I get: hummingbird.ml.exceptions.MissingConverter: Unable to find converter for model type <class 'lightgbm.basic.Booster'>.
The text was updated successfully, but these errors were encountered: