Skip to content
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

Implement convert_to_onnx.py #4

Merged
merged 4 commits into from Apr 17, 2023
Merged

Implement convert_to_onnx.py #4

merged 4 commits into from Apr 17, 2023

Conversation

GiulioRomualdi
Copy link
Member

This PR adds the possibility to convert the pytorch model into onnx via the new script scripts/convert_to_onnx.py

I also need to ask for pytorch 1.13.0 to avoid this issue: pytorch/pytorch#51183

By the way, I discovered that Pytorch 1.13.0 has a vulnerability. Indeed in PyTorch before trunk/89695, torch.jit.annotations.parse_type_line can cause arbitrary code execution because eval is used unsafely. The fix for this issue is available in version 1.13.1. There is a release checker in pytorch/pytorch#89855.

So we may think to ask for pytorch 1.13.1

@GiulioRomualdi GiulioRomualdi self-assigned this Apr 11, 2023
@GiulioRomualdi GiulioRomualdi changed the title Onnx torch Implement convert_to_onnx.py Apr 11, 2023
torch==1.13.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to run both the training and testing scripts with this PyTorch version. They work fine.

scripts/convert_to_onnx.py Outdated Show resolved Hide resolved
GiulioRomualdi and others added 2 commits April 13, 2023 13:52
Co-authored-by: Paolo Viceconte <paolomariaviceconte@gmail.com>
@GiulioRomualdi
Copy link
Member Author

In 9ed8fec I also added the onnx model.
@paolo-viceconte feel free to merge the PR whenever you want

@paolo-viceconte paolo-viceconte merged commit 51a3890 into main Apr 17, 2023
@GiulioRomualdi GiulioRomualdi deleted the onnx_torch branch April 17, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants