onnxmltools icon indicating copy to clipboard operation
onnxmltools copied to clipboard

NotImplementedError: Unsupported LightGbm objective: 'huber'.

Open krotonic opened this issue 3 years ago • 2 comments

When saving a LightGBM model to ONNX via convert_lightgbm, the following error is produced (onnxmltools 1.11.0, lightgbm 3.3.2):

NotImplementedError: Unsupported LightGbm objective: 'huber'.

Is there a workaround for this? Or a possibility this will be implemented in the future?

krotonic avatar May 09 '22 15:05 krotonic

Any updates?

ogencoglu avatar Sep 07 '24 10:09 ogencoglu

Goofy hack... serialize to string, replace huber with regression, serialize. Some of the other hacks around here like dump_model don't work anymore.

modelString = huberModel.model_to_string() modelString = modelString .replace( "huber", "regression" ) regressionModel = lgb.Booster( model_str = modelString )

chasse20 avatar Dec 27 '24 05:12 chasse20