Add onnx export with verification#6237
Conversation
Signed-off-by: Liqun Fu <[email protected]>
|
Hi @liqunfu , Thanks, |
I am starting today to update my PR with reviewers' comments and to fix CI failures. I was trying to add more test for models that are used by model-zoo but it is time consuming because I need to get evaluation data some of which also need to wait for access approval. I agree with @ericspod that it can be in another PR. BTW thanks all for reviewing this PR. I will update it by the end of today. |
@binliunls Please feel free to add to this PR with what you may already have so we can merge sooner. |
Signed-off-by: Liqun Fu <[email protected]>
…st because it failed with torch < 1.12 Signed-off-by: Liqun Fu <[email protected]>
Signed-off-by: Liqun Fu <[email protected]>
Signed-off-by: Liqun Fu <[email protected]>
Signed-off-by: Liqun Fu <[email protected]>
Signed-off-by: Liqun Fu <[email protected]>
Nic-Ma
left a comment
There was a problem hiding this comment.
Hi @liqunfu ,
About adding a new optional dependency package, please refer to:
https://github.com/Project-MONAI/MONAI/blob/dev/CONTRIBUTING.md#adding-new-optional-dependencies
Thanks.
|
Mark: This PR will be targeting MONAI 1.2 P1 feature as several bundles which can't be supported by Thanks. |
Signed-off-by: Liqun Fu <[email protected]>
…dency Signed-off-by: binliu <[email protected]>
Signed-off-by: binliu <[email protected]>
|
Hi @wyli , error: Thanks, |
There was a problem hiding this comment.
Looks good to me, put some minor comments inline.
@wyli Do you think we need to add all the optional packages in this function or only selected?
https://github.com/Project-MONAI/MONAI/blob/dev/monai/config/deviceconfig.py#L64
Thanks.
Signed-off-by: binliu <[email protected]>
Signed-off-by: binliu <[email protected]>
Signed-off-by: binliu <[email protected]>
Signed-off-by: binliunls <[email protected]>
Signed-off-by: binliu <[email protected]>
Nic-Ma
left a comment
There was a problem hiding this comment.
Thanks for the update, looks good to me.
Please fix the failed CI tests on windows, if it's expected error, please add skip_if_windows decorator.
Thanks.
Signed-off-by: binliu <[email protected]>
…ast time this PR pass windows CI Signed-off-by: Liqun Fu <[email protected]>
Signed-off-by: Liqun Fu <[email protected]>
Signed-off-by: Liqun Fu <[email protected]>
|
/build |
|
/build |
1 similar comment
|
/build |
Fixes #6258 . ### Description Add onnx as an option for converting pytorch models to TensorRT models through `trt_export` API. This pr depends on #6237 to add the onnx convert function. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: binliu <[email protected]>
Fixes # Issue#TBD.
Description
A MONAI Bundle can contain models in PyTorch, TorchScript, and ONNX formats.
Utility exists in MONAI to export a model in TorchScript format. Exported TorchScript models can be verified with Torch runtime.
It is helpful (and complete) to provide a same utility to export ONNX models and to validate the models with PyTorch, ONNX(https://github.com/onnx/onnx), and onnxruntime (https://github.com/microsoft/onnxruntime).
With the proposed utility, ONNX model can be added to bundles in model-zoo with calling monai.bundle ckpt_export.
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder../runtests.sh --quick --unittests --disttestsTOTAL 72191 11290 84%