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

New LGBM Version 4.0.0 changes #725

Closed
ksaur opened this issue Jul 16, 2023 · 2 comments · Fixed by #748
Closed

New LGBM Version 4.0.0 changes #725

ksaur opened this issue Jul 16, 2023 · 2 comments · Fixed by #748

Comments

@ksaur
Copy link
Collaborator

ksaur commented Jul 16, 2023

LGBM 4.0.0 was released 3 days ago. From Friday runner test_onnxml_lightgbm_converter.py:

>       from lightgbm.basic import (
            _LIB, FEATURE_IMPORTANCE_TYPE_MAPPER, _safe_call,
            json_default_with_numpy)
E       ImportError: cannot import name 'FEATURE_IMPORTANCE_TYPE_MAPPER' from 'lightgbm.basic' (C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\lightgbm\basic.py)

C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\onnxmltools\convert\lightgbm\operator_converters\LightGbm.py:267: ImportError

They have added an underscore to many things. Ex: FEATURE_IMPORTANCE_TYPE_MAPPER becomes _FEATURE_IMPORTANCE_TYPE_MAPPER. See microsoft/LightGBM#5654

Also in test_onnxml_lightgbm_converter.py:

FAILED tests/test_onnxml_lightgbm_converter.py::TestONNXLightGBMConverter::test_lightgbm_booster_classifier - AttributeError: 'Booster' object has no attribute 'attr'

Need to investigate what other breaking changes for us.

@ksaur
Copy link
Collaborator Author

ksaur commented Jul 16, 2023

The errors are coming from within onnxmltools ( self.booster_.attr('objective') and FEATURE_IMPORTANCE_TYPE_MAPPER ) which doesn't yet match the new lightgbm version. Opened onnx/onnxmltools#632

Will pin for now!

@ksaur
Copy link
Collaborator Author

ksaur commented Aug 1, 2023

onnx/onnxmltools#634 was merged ! :)
So we can either wait for release, or change pipeline to pull from main

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 a pull request may close this issue.

1 participant