sklearn-onnx
sklearn-onnx copied to clipboard
Pickle to ONNX error in imblearn
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'>'.
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?