onnxmltools
onnxmltools copied to clipboard
ImportError: cannot import name 'hummingbird_installed'
There was an error when I tried to import convert_lightgbm. See code below:
import lightgbm
import onnxmltools
import onnx
import os
print("onnx: ", onnx.__version__)
print("onnxmltools: ", onnxmltools.__version__)
print("lightgbm: ", lightgbm.__version__)
onnx: 1.8.0
onnxmltools: 1.7.0
lightgbm: 3.1.0
from onnxmltools.convert.lightgbm.operator_converters.LightGbm import convert_lightgbm
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-6-b77a20ee8474> in <module>
----> 1 from onnxmltools.convert.lightgbm.operator_converters.LightGbm import convert_lightgbm
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/onnxmltools/convert/lightgbm/__init__.py in <module>
5 # --------------------------------------------------------------------------
6
----> 7 from .convert import convert
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/onnxmltools/convert/lightgbm/convert.py in <module>
10 import onnx
11 from ..common._topology import convert_topology
---> 12 from ..common.utils import hummingbird_installed
13 from ._parse import parse_lightgbm, WrappedBooster
14
ImportError: cannot import name 'hummingbird_installed'
I think the latest onnxconveter-common package (1.7.0) does not contain the hummingbird_installed() function.
For the time being, I suggest installing onnxconverter-common from source. We should release a new version soon including this function.
Will be fixed by #468.
Did you try recently?
@xadupre Yes, this's fine using the latest version. And by the way, this is Jack you are helping me with the lightgbm conversion discrepencies.