-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Error running quantize_dynamic: Failed to find proper ai.onnx domain #15563
Comments
This looks unnormal. The first opset only has version but not domain. We checked opset version because quantization is supported from ONNX opset 10. |
Thanks for the response. I get why it checks the opset but why does the length of the list need to be exactly 1? And if not having a domain is abnormal then why does the code snippet look for opsets where My model is supposed to have 3 subcomponents: BERT, mean pooling, logistic regression head. That was the filtered list [version: 12
, domain: ""
version: 12
, domain: "ai.onnx.ml"
version: 1
] If these represent the three components that I think they do and the last opset is 1 this is also weird because it should be 12 like the other components... Hmm... |
It is fine that {domain: "", version: 12} and {domain: "ai.onnx.ml", version: 1} both exists since they are different domains. But if there are {domain: "", version: 12} and {domain: "ai.onnx", version: 1}, then they are conflicting since "" and "ai.onnx" are same domain. The first one {version: 12} without domain is invalid. |
Hi @bogedy did you get a solution to this issue? I am seeing this issue as well when running quantization, i wonder whether you were able to get it to work |
I have the same issue in the absolute same setfit context, also with sklearn classification head. Would be very interested in a solution, too. |
@rawinkler @yixzhou Have you been able to resolve this issue? |
@yugaljain1999 : Unfortunately not, I am sorry. |
Describe the issue
When running this:
I get
ValueError: Failed to find proper ai.onnx domain
.The culprit seems to be this code in
onnxruntime/quantization/onnx_quantizer.py
:When I load in my model myself and make the
ai_onnx_domain
I get this:Am I missing something about quantizing here? Why does
len(ai_onnx_domain)
need to be 1?To reproduce
My model is from the huggingface/setfit library, so it's a pytorch sentence_transformers embedding model plus an sklearn logistic regression head. It was trained as follows:
I exported to ONNX using this script here https://github.com/huggingface/setfit/blob/main/src/setfit/exporters/onnx.py, which makes use of the ONNX exporter in torch and skl2onnx.
Urgency
No response
Platform
Linux
OS Version
Ubuntu 20.04
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.14.1
ONNX Runtime API
Python
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: