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

Support for PyTorch Lightning #71

Open
jeremyfowers opened this issue Dec 15, 2023 · 0 comments
Open

Support for PyTorch Lightning #71

jeremyfowers opened this issue Dec 15, 2023 · 0 comments
Labels
good first issue Good for newcomers p2 Low priority

Comments

@jeremyfowers
Copy link
Collaborator

jeremyfowers commented Dec 15, 2023

Problem Statement

TurnkeyML currently supports only torch.nn.modules within the turnkey benchmark command. However, there is interest in using TurnkeyML with PyTorch Lightning modules as well.

Scope of Work

At least the following improvements would be needed to support PyTorch Lightning:

  1. In the analyze module, detect PyTorch Lightning modules and pass them to explore_invocation(). Currently, we only pass torch.nn.module to explore_invocation().
  2. Add a new build Stage to export the Lightning module to ONNX. This is hopefully as simple as calling lightning_module.to_onnx().
  3. Add this new build stage to the ExportPlaceholder Stage so that it can be automatically selected whenever a Lightning module is encountered.

Contribution

  • I am setting a priority of P2 until we have an e2e example available that we can use for testing.
  • I believe that this would make a good first issue if someone wanted to contribute it.

cc @andife with regards to #69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers p2 Low priority
Projects
None yet
Development

No branches or pull requests

1 participant