sklearn-onnx icon indicating copy to clipboard operation
sklearn-onnx copied to clipboard

Pickle to ONNX error in imblearn

Open diaaMS opened this issue 2 years ago • 1 comments

i faced this error while converting sklearn pickle model to onnx, any ideas about how to solve this

initial_type = [('float_input', FloatTensorType([None, 13]))]
onnx_model = convert_sklearn(model, initial_types=initial_type)\
MissingShapeCalculator: Unable to find a shape calculator for type '<class 'imblearn.under_sampling._prototype_selection._random_under_sampler.RandomUnderSampler'>'.

diaaMS avatar Jul 24 '22 10:07 diaaMS

sklearn-onnx only supports model from scikit-learn. The documentation gives example on how to implement a new converter: https://onnx.ai/sklearn-onnx/tutorial_2_new_converter.html. The error does not seem related to pickle, am I missing something?

xadupre avatar Aug 01 '22 15:08 xadupre