Open achyuta26 opened 2 months ago
The full stack is not given but I assume the error comes from function calculate_linear_classifier_output_shapes
which tries to infer the number of output columns. You can either create your own function to calculate the output shape or modify your model so that function def _infer_linear_classifier_output_types(operator):
is able to guess the number of classes.
I'm trying to create a pipeline with 3 models. I wanted to do try out a POC with a toy dataset simulating 3 classifiers that I've actually trained. So I picked up the iris dataset and broke it into 3 datasets for each model and class. Amongst the 3 models, the first two are LightGBM classifer and the 3rd is a RandomForest classifer. The objective is to take 4 features and have 3 binary classifiers send their prediction in a pipeline.
This is the code snippet I'm trying to run to generate a pipeline of onnx format:
While running the last command for
model_onnx
it returns this error:RuntimeError: No known ways to retrieve the number of classes for class <class '__main__.SetosaPredictionModel'>.
Library versions:
I've come across some blogs trying to convert the pipeline but I need to have it for a custom model class. TIA!