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

ONNX support #340

Open
ogencoglu opened this issue Jan 9, 2025 · 4 comments
Open

ONNX support #340

ogencoglu opened this issue Jan 9, 2025 · 4 comments

Comments

@ogencoglu
Copy link

Does treeple support ONNX export? It would be great as ONNX is the common format for all sorts of models and can be deployed to any environment (e.g. scikit-learn, lightgbm, xgboost etc all support ONNX export).

@adam2392
Copy link
Collaborator

No ONNX is not supported yet, but the package supports pickling in the same way scikit-learn does. I'm not familiar with how to get ONNX support working.

Are there any technical features required for that?

@ogencoglu
Copy link
Author

Thanks for the reply. skl2onnx library supports a lot of base models from scikit-learn. If treeple models can use similar classes, it should be straightforward.

Note that ONNX is quite different than pickling. It is safe, it provides inference optimizations, it is framework, programming language or environment agnostic.

@adam2392
Copy link
Collaborator

Just to understand a bit better, what is your use-case for using ONNX instead of the actual pickled model?

Would you be interested in exploring how to get treeple models working with ONNX?

@ogencoglu
Copy link
Author

ogencoglu commented Jan 10, 2025

Because pickle is a python-specific format and one can not serve pickle in frontend (Typescript or javascript) or embed in some C++ application etc.

I may have a look during spring if I have time.

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

No branches or pull requests

2 participants