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

Trying to export MultiOutputRegressor(LGBMRegressor()) to onnx #649

Closed
jaegerjj opened this issue Sep 5, 2023 · 0 comments
Closed

Trying to export MultiOutputRegressor(LGBMRegressor()) to onnx #649

jaegerjj opened this issue Sep 5, 2023 · 0 comments

Comments

@jaegerjj
Copy link

jaegerjj commented Sep 5, 2023

Hi,

I tried to export this model to onnx:

from sklearn.multioutput import MultiOutputRegressor from lightgbm import LGBMRegressor model = MultiOutputRegressor(LGBMRegressor()) model.fit(X_train, y_train)

import onnxmltools import onnxmltools.convert.common.data_types from skl2onnx import convert_sklearn from skl2onnx.common.data_types import FloatTensorType initial_type = [('float_input', FloatTensorType([None, 1997]))] onx = onnxmltools.convert.convert_lightgbm(model, initial_types=initial_type) with open("test.onnx", mode = 'wb') as f: f.write(onx.SerializeToString())

https://prnt.sc/tbSL1q9JFmzs

Output: ValueError: No proper operator name found for '<class 'sklearn.multioutput.MultiOutputRegressor'>'

Is it possible to use onnxmltools to export this model to onnx? Thanks for any help.

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

No branches or pull requests

1 participant