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

Fix conversion of XGBoost model after being restored - Cont #520

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

BowenBao
Copy link
Contributor

Based on #506.

After being restored, the loaded booster is not exactly the same in memory. best_ntree_limit is not saved during save_model.
This PR enables num_class and n_estimators inference through tree_info instead of best_ntree_limit.
tree_info is a required property for gbtree JSON schema https://xgboost.readthedocs.io/en/latest/tutorials/saving_model.html?highlight=tree_info#json-schema.

@BowenBao BowenBao closed this Dec 2, 2021
@BowenBao BowenBao reopened this Dec 2, 2021
@BowenBao BowenBao closed this Dec 2, 2021
@BowenBao BowenBao reopened this Dec 2, 2021
@BowenBao
Copy link
Contributor Author

BowenBao commented Dec 2, 2021

license/cla shows Waiting for status to be reported indefinitely, is this expected @xadupre ?

@BowenBao BowenBao force-pushed the bowbao/num_class branch 3 times, most recently from 8a8476b to 5a88a73 Compare December 7, 2021 19:25
Infer num_class and n_estimators through tree_info
add target_opset to test cases
Adjust opset version for hummingbird due to torch opset version support

Signed-off-by: BowenBao <bowbao@microsoft.com>
@BowenBao
Copy link
Contributor Author

BowenBao commented Dec 7, 2021

@xadupre CI all green, please merge when you get a chance, thanks!

@xadupre xadupre merged commit 8ab3401 into onnx:master Dec 8, 2021
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.

3 participants