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

Allow parsing input tensors from torch ScriptModules #57

Merged
merged 5 commits into from
Feb 6, 2024

Conversation

EthanMarx
Copy link
Contributor

@EthanMarx EthanMarx commented Feb 6, 2024

When converting from torch model to tensorrt, if input is a TorchScript model, it is not possible to directly infer model parameters from forward method via inspect library.

Instead, infer parameters directly from model graph.

Updates torch version to ^2.0 for consistency with ml4gw

reopened version of #49

@EthanMarx EthanMarx merged commit af7aa3b into ML4GW:dev Feb 6, 2024
5 checks passed
@EthanMarx EthanMarx deleted the torchscript-tensorrt-new branch February 6, 2024 21:34
EthanMarx added a commit that referenced this pull request Oct 3, 2024
* add ability to parse inputs from script module

* update torch dep to ^2.0 for consistency with ml4gw

* add onnx dep

* remove both tests

* remove both tests
EthanMarx added a commit that referenced this pull request Oct 3, 2024
* Allow parsing input tensors from torch `ScriptModules` (#57)

* add ability to parse inputs from script module

* update torch dep to ^2.0 for consistency with ml4gw

* add onnx dep

* remove both tests

* remove both tests

* Batched state updates (#59)

* allow for batched state updates

* update poetry lock

* restrict tf version

* revert whitespaces

* Allow python 3.12 and explicitly list PyPI as a source for future compatibility

* Add python 3.12 to unit tests

* Add py312 to tox file

* Missed one

* Attempt to update tensorflow

* Change tf specification

* Force usage of keras 2

* Fix formatting

* Remove py38 support and install tf-keras

* More intelligent and flexible input and output tensor naming for `TorchScript` Exporter (#62)

* support direct torchscript export from ScriptModule

* add tests of new naming behavior

* guard torch import

* add jit module to handles for onnx and torchscript exporters

* add script module test to exporter utils

* bump to version 0.2.0 (#64)

---------

Co-authored-by: William Benoit <[email protected]>
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.

1 participant