dmlc / treelite

Universal model exchange and serialization format for decision tree forests
https://treelite.readthedocs.io/en/latest/
Apache License 2.0
730 stars 98 forks source link

xgboost json model fails to load #561

Closed LLautenbacher closed 4 months ago

LLautenbacher commented 5 months ago

Hi,

I have a xgboost model in JSON format when I try to load it with treelite version >4.0 (treelite.frontend.load_xgboost_model) I get the error Node with key 1 is orphaned -- it cannot be reached from the root node. With version 3.9 (treelite.Model.load) it worked without issue. Do you have an idea what is causing this, or how I can convert the json into a format that works with treelite >4.0?

You can download the model file from Zenodo: https://zenodo.org/records/7576604

Thank you for your help in advance!

hcho3 commented 5 months ago

Can you also share the script you used for training the XGBoost model? I'd like to know the list of hyperparameters.

LLautenbacher commented 5 months ago

I didn't train the model myself. But this is probably the script that was used to train it and this should be the hyperparameters selected during tuning. image Taken from the supplement of this paper.

hcho3 commented 4 months ago

@LLautenbacher The bug should be fixed in the upcoming Treelite release. Thanks!