You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to convert my XGBClassifier with the 'gblinear' booster to onnx. Currently, this only works if the booster is 'gbtree'.
Because the gblinear doesn't use trees as weak learners, there is no tree node available.
/onnxmltools/convert/xgboost/operator_converters/XGBoost.py:149), in XGBConverter._remap_nodeid(jsnode, remap)
python3.8/site-packages/onnxmltools/convert/xgboost/operator_converters/XGBoost.py?line=146) if remap is None:
python3.8/site-packages/onnxmltools/convert/xgboost/operator_converters/XGBoost.py?line=147) remap = {}
python3.8/site-packages/onnxmltools/convert/xgboost/operator_converters/XGBoost.py?line=148) nid = jsnode['nodeid']
python3.8/site-packages/onnxmltools/convert/xgboost/operator_converters/XGBoost.py?line=149) remap[nid] = len(remap)
[151](python3.8/site-packages/onnxmltools/convert/xgboost/operator_converters/XGBoost.py?line=150) if 'children' in jsnode:
KeyError: 'nodeid'
Hello everyone,
I would like to convert my XGBClassifier with the 'gblinear' booster to onnx. Currently, this only works if the booster is 'gbtree'.
Because the gblinear doesn't use trees as weak learners, there is no tree node available.
The simplest example which fails would be:
With this KeyError:
Where the jsnode is:
For 'gbtree' everything works fine.
Related issues: #609
Thank you in advance!
The text was updated successfully, but these errors were encountered: