-
Notifications
You must be signed in to change notification settings - Fork 454
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
Add MPNet ONNX export #691
Conversation
@@ -111,6 +111,10 @@ def inputs(self) -> Mapping[str, Mapping[int, str]]: | |||
return {"input_ids": dynamic_axis, "attention_mask": dynamic_axis} | |||
|
|||
|
|||
class MPNetOnnxConfig(DistilBertOnnxConfig): | |||
DEFAULT_ONNX_OPSET = 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for my knowledge, is opset 11 failing for this model? If you want, you can add a comment as to why opset 12 is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the error when export with opset 11:
An error occured with the error message: [ONNXRuntimeError] : 10 : INVALID_GRAPH : Load model from here/model.onnx failed:This is an invalid model. Type Error: Type 'tensor(int64)' of input parameter (/encoder/Add_1_output_0) of operator (Min) in node (/encoder/Min) is invalid..
Apparently the Min operator is not compliant with int64 tensors (as far as what I understand from this message)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, looks good to me as long as the tests pass!
Edit: you may need to run make style
The documentation is not available anymore as the PR was closed or merged. |
Looks like there an issue with the multiple_choice task:
@fxmarty any idea how to fix this? Or should I remove this tasks from the task manager? |
@jplu It's probably just an issue with You should be able to run the failing test specifying |
The test is skiped:
|
Hum that's weird. What if you just pass |
They are all skipped:
|
I can run the mpnet tests locally on your branch with (edit: the tests pass well with |
It's all good, thanks for the addition! |
What does this PR do?
This PR adds the possibility to export MPNet models into the ONNX format.
Before submitting