-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: Not all operators have been evaluated. A variable name is probably misspelled. #817
Comments
Which version of scikit-learn are you using? |
I tried to cover your example by adding two unit tests but it did not fail for me. What are the differences between your model and the ones I added in PR #820? |
Hello, huge thanks for your reply! I'm using sklearn version: 1.0.1. Attached is the graph of the pipeline. But first, let me clarify the pipeline from above:
In the above,
Regarding the attached: On line 122 is this:
I'm at a bit of a loss, not sure where this error is originating or what's causing the graph to break. The output of CatColEncoder successfully flows through every step of the pipeline - and conversion to onnx is successful when a voting classifier is used instead of a stacking classifier. Any thoughts, hints, suggestions are very appreciated. Thank you, |
I'm puzzled. I tried to use a dataframe as an input but it still works (see last commit in the PR). And if |
I'm puzzled too, and I really want to get this to work. Attached is a zip file that contains a demo notebook that you can run. The converter is inside Thanks again, |
I tried your notebook but nothing fails for me. I then tried the following pipeline but still no failure. I did not find any model with StackingClassifier. Did I miss something?
|
Hi, thanks for responding! Attached is a new notebook that fully demonstrates the bug (titled
And to reiterate: the problem is specifically with a pipeline that contains the StackingClassifier (other classifiers work fine): Much appreciated, |
I was finally able to replicate the bug and found the cause. I updated the PR to fix the bug. I should release a new version by the end of week. |
* investigate an issue with StackingClassifier * fix issue 817
Excellent, glad that you've solved it!! I look forward to the next version and will test again! Thanks much, |
Hello,
I have the following sklearn pipeline with a
StackingClassifier
that uses 2 XGB classifiers (stored in a dict) as estimators:If I try to convert
stacking_ensemble
to onnx on it's own - it works.If I try to convert
ColTransformer
to onnx on it's own - it works.If I try to convert a sklearn pipeline with
ColTransformer
and any other sklearn model (including ensemble models like voting classifier) - it works.However when I try to convert the above
pipeline
(specifically with aStackingClassifier
) to onnx, I get this:RuntimeError: Not all operators have been evaluated. A variable name is probably misspelled.
With the only operator being
is_eval=None
as this one:Operator(type='SklearnLinearClassifier', onnx_name='SklearnLinearClassifier', inputs='merged_probability_tensor', outputs='label3,probability_tensor2', raw_operator=LogisticRegression())
This operator is the
final_estimator
in theStackingClassifier
per here, which defaults to aLogisticRegression
classifier.Do you know what the problem might be? Any help is greatly appreciated.
Thank you very much,
EB
The text was updated successfully, but these errors were encountered: