Skip to content

Allow exporting to onnx when input is tuple#8800

Merged
awaelchli merged 1 commit intoLightning-AI:masterfrom
xerus:bugfix/8799-export-onnx-two-inputs
Sep 2, 2021
Merged

Allow exporting to onnx when input is tuple#8800
awaelchli merged 1 commit intoLightning-AI:masterfrom
xerus:bugfix/8799-export-onnx-two-inputs

Conversation

@xerus
Copy link
Copy Markdown
Contributor

@xerus xerus commented Aug 8, 2021

What does this PR do?

Per docs for example_input_array the model input can be Tensor, Tuple or Dict.
When input is tuple, it's forwarded as tuple.

Fixes #8799

Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 8, 2021

Codecov Report

Merging #8800 (10bb958) into master (24f0124) will decrease coverage by 4%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #8800    +/-   ##
=======================================
- Coverage      93%     89%    -4%     
=======================================
  Files         169     169            
  Lines       14078   14080     +2     
=======================================
- Hits        13052   12476   -576     
- Misses       1026    1604   +578     

@awaelchli awaelchli added the bug Something isn't working label Aug 9, 2021
@awaelchli awaelchli added this to the v1.4.x milestone Aug 9, 2021
Comment thread pytorch_lightning/core/lightning.py Outdated
Comment thread tests/models/test_onnx.py Outdated
Comment thread tests/models/test_onnx.py Outdated
Comment thread tests/models/test_onnx.py Outdated
@xerus xerus force-pushed the bugfix/8799-export-onnx-two-inputs branch from 072eb5b to 8f3c73a Compare August 11, 2021 12:48
Copy link
Copy Markdown
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

LGTM
mind adding a changelog entry too? :)

@xerus xerus force-pushed the bugfix/8799-export-onnx-two-inputs branch from 8f3c73a to 10bb958 Compare August 11, 2021 16:41
@xerus
Copy link
Copy Markdown
Contributor Author

xerus commented Aug 11, 2021

LGTM
mind adding a changelog entry too? :)

Thanks, updated

Comment thread pytorch_lightning/core/lightning.py
Copy link
Copy Markdown
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGTM !

@mergify mergify Bot added the ready to be merged PRs ready to be merged label Sep 1, 2021
@awaelchli awaelchli merged commit e2ecb8f into Lightning-AI:master Sep 2, 2021
justusschock pushed a commit that referenced this pull request Sep 7, 2021
awaelchli pushed a commit that referenced this pull request Sep 7, 2021
lexierule pushed a commit that referenced this pull request Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready to be merged PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export to_onnx fails when model has multiple inputs

4 participants