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

Is there any plan to make forust model format compatible of xgboost? #105

Open
testforvln opened this issue Apr 29, 2024 · 4 comments
Open

Comments

@testforvln
Copy link

I found that forust is the only crate in pure rust for xgboost. I've got some models trained in xgboost. It will be very convenient if forust can support xgboost-format-compatible models inference.

@jinlow
Copy link
Owner

jinlow commented Apr 29, 2024

I think it’s possible, forust saves more information than XGBoost with the final model. So would have to think through good defaults for the missing information.

@jinlow jinlow closed this as completed Apr 29, 2024
@jinlow jinlow reopened this Apr 29, 2024
@jinlow
Copy link
Owner

jinlow commented May 2, 2024

Would you be open to converting the models into the forust format using Python? Or are you looking for a pure rust implementation for the conversion?
I have working code/functionality, for converting some XGBoost models into a forust model using Python. At which point the model could be saved, and then loaded and used with the forust rust API from then on.

@testforvln
Copy link
Author

Would you be open to converting the models into the forust format using Python? Or are you looking for a pure rust implementation for the conversion? I have working code/functionality, for converting some XGBoost models into a forust model using Python. At which point the model could be saved, and then loaded and used with the forust rust API from then on.

It's OK to use Python to convert models.

@testforvln
Copy link
Author

py_test_0.zip
Hi @jinlow , I use the python function of forust._from_xgboost_model(), but the two models' predict results seem to diff too much from each other. Can you reproduce it? The test code is in the attachment.

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