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

Remove support for TorchScript tracing #361

Merged

Conversation

danieldk
Copy link
Contributor

@danieldk danieldk commented Feb 8, 2024

Description

We added support for TorchScript tracing a while back, so that models
can be exported to ONNX. However, the support relies on metaclasses,
which breaks with torch.compile in the latest PyTorch versions. However,
PyTorch now provides a TorchDynamo-based ONNX exporter:

https://pytorch.org/docs/stable/onnx_dynamo.html

So it's time to yank TorchScript tracing support and remove all the
fragile dataclass/tuple/dict polymorphism.

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.

@danieldk danieldk added feat/model Feature: models type/maintenance Type: Maintenance labels Feb 8, 2024
@danieldk danieldk force-pushed the maintenance/yank-torchscript-support branch from 7e2599a to fd49ae7 Compare February 8, 2024 15:43
We added support for TorchScript tracing a while back, so that models
can be exported to ONNX. However, the support relies on metaclasses,
which breaks with torch.compile in the latest PyTorch versions. However,
PyTorch now provides a TorchDynamo-based ONNX exporter:

https://pytorch.org/docs/stable/onnx_dynamo.html

So it's time to yank TorchScript tracing support and remove all the
fragile dataclass/tuple/dict polymorphism.
@danieldk danieldk force-pushed the maintenance/yank-torchscript-support branch from fd49ae7 to 8b3abc5 Compare February 9, 2024 08:47
@danieldk danieldk marked this pull request as ready for review February 9, 2024 08:56
@danieldk danieldk merged commit a52e9db into explosion:main Feb 12, 2024
9 checks passed
@danieldk danieldk deleted the maintenance/yank-torchscript-support branch February 12, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat/model Feature: models type/maintenance Type: Maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant