You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to convert a Light GBMRegressor using the convert_lightgbm function.
I am using a mix of categorical (string) and float values.
However, when I try to specify differerent initial_types, I get this error :
RuntimeError: For operator LgbmRegressor (type: LgbmRegressor), at most 1 input(s) is(are) supported but we got 15 input(s) which are ['postal_code_mission', 'do_code', 'dz_code', 'agency_code', 'adecco_code', 'siret', 'cod_prs_prc', 'cod_zep_ctr', 'cod_sgm_tt_con', 'depenses_client', 'month', 'hourly_rate', 'contract_duration', 'tension', 'difficulty']
I think it means I can only specify one input, so it has to be either float or string but can't be both ?
I tried doing :
initial_type = [('float_input', FloatTensorType([None, X_train.shape[1]]))]
# Convert the LightGBM model to ONNX format
onnx_model = onnxmltools.convert_lightgbm(model, initial_types=initial_type)
It worked for the conversion, but when in inference I got this error :
Hi,
I'm trying to convert a Light GBMRegressor using the
convert_lightgbm
function.I am using a mix of categorical (string) and float values.
However, when I try to specify differerent initial_types, I get this error :
I think it means I can only specify one input, so it has to be either float or string but can't be both ?
I tried doing :
It worked for the conversion, but when in inference I got this error :
Wich makes sense since I'm passing string to something that expect floats ...
Am I doing something wrong or is there no way to convert a LGBMRegressor in onnx format with both string and float tensor ?
The text was updated successfully, but these errors were encountered: