-
Notifications
You must be signed in to change notification settings - Fork 189
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
errror:'Booster' object has no attribute 'attr' #645
Comments
I have the issue, any updates? |
I have this issue also, any updates? |
any updates? or any other solutions? |
Force downgrade of LightGBM to < v4.0 solved this for me:
|
t hank you!!!!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
model_path = 'c://model/m18.m1'
lgb_model = lgb.Booster(model_file=model_path)
input_type = FloatTensorType([1, 154])
onnx_model = onnxmltools.convert_lightgbm(lgb_model, initial_types=[('input', input_type)],
target_opset=9)
Traceback (most recent call last):
Cell In[4], line 1
onnx_model = onnxmltools.convert_lightgbm(lgb_model, initial_types=[('input', input_type)],
File C:\anaconda3\Lib\site-packages\onnxmltools\convert\main.py:137 in convert_lightgbm
return convert(model, name, initial_types, doc_string, target_opset, targeted_onnx,
File C:\anaconda3\Lib\site-packages\onnxmltools\convert\lightgbm\convert.py:59 in convert
model = WrappedBooster(model)
File C:\anaconda3\Lib\site-packages\onnxmltools\convert\lightgbm_parse.py:25 in init
self.objective_ = self.get_objective()
File C:\anaconda3\Lib\site-packages\onnxmltools\convert\lightgbm_parse.py:62 in get_objective
objective = self.booster_.attr('objective')
AttributeError: 'Booster' object has no attribute 'attr'
//*****************************
python=3.11
lithtgbm=4.0.0
onnxmltools=1.11.2
The text was updated successfully, but these errors were encountered: