onnxmltools
onnxmltools copied to clipboard
NotImplementedError: Unsupported LightGbm objective: 'huber'.
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?
Any updates?
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 )