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

CoreML support for LightGBM models #1074

Closed
karthikv2k opened this issue Nov 19, 2017 · 11 comments
Closed

CoreML support for LightGBM models #1074

karthikv2k opened this issue Nov 19, 2017 · 11 comments

Comments

@karthikv2k
Copy link

Is there a plan to support ONNX as an output format for LightGBM models?

@Laurae2
Copy link
Contributor

Laurae2 commented Nov 19, 2017

@karthikv2k Probably not, GBDT has mostly nothing to do with tensor programming, logical (boolean) tensors for computational graphs are not appropriate (both in speed and efficiency) versus the current implementation of prediction.

Unless someone generates a converter from tree ensembles to neural network / computational graph.

@karthikv2k
Copy link
Author

@Laurae2 Thanks for your prompt response. I am looking for a standard way to export LightGBM models into a language agnostic format. This will allow us to build production ML inferencing systems that can take this format as input. For example, CoreML provides a way to convert XGBoost models to their open CoreML protobuf based spec. I see there is a link to JPMML in the readme to convert LightGBM into PMML format but JPMML has the viral AGPL licensing.

@karthikv2k
Copy link
Author

I just realized there is a PMML convertor in pmml/pmml.py . It is good to have CoreML support too similar to XGBoost and CatBoost . I think I can work on it.

@guolinke
Copy link
Collaborator

guolinke commented Nov 24, 2017

@karthikv2k Thanks.
unfortunately, the pmml support is broken now due to the missing of categorical feature support.

here is another solution: https://github.com/dmlc/treelite

@guolinke guolinke changed the title ONNX support for LightGBM models CoreML support for LightGBM models Dec 17, 2017
@guolinke
Copy link
Collaborator

@wxchan @StrikerRUS what is your thoughts about CoreML support ?

@StrikerRUS
Copy link
Collaborator

@guolinke I've never hear about CoreML before this issue, because I'm far away from Apple world.

I think I can work on it.

However, if @karthikv2k have time and interest in developing it, then it's good and valuable enhancement for LightGBM.

@StrikerRUS
Copy link
Collaborator

@karthikv2k Any news?

Guys from ONNX have added support for LightGBM (only GBDT mode): onnx/onnxmltools#52.

@TechnikEmpire
Copy link

AFAIK ML.NET uses LightGBM internally and supports ONNX export.

@schliffen
Copy link

I used xgboost to coreml conversion, the problem is that the inputs for converted mlmodel are so that we should input features separately! (not sure if we can enter features as a single vector).
Can anyone help me in converting lightGBM to coreml?

@StrikerRUS
Copy link
Collaborator

Closed in favor of being in #2302. We decided to keep all feature requests in one place.

Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature.

@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Nov 24, 2019

Open PR for adding LightGBM to CoreML: apple/coremltools#254.

It was opened on Oct 4 2018 but still is not merged. Someone with the CoreML knowledge may help to review and push that PR forward.

XGBoost converter: https://github.com/apple/coremltools/tree/master/coremltools/converters/xgboost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants