fix: Improve input handling for input_signature#1698
Merged
gs-olive merged 1 commit intopytorch:mainfrom Feb 28, 2023
Merged
Conversation
- Improve error messaging for input signature arguments by verifying the nesting depth of the object is within the bounds specified in the TorchScript compiler - Throw user-error more quickly to avoid less-interpretable error messages later on
narendasan
approved these changes
Feb 27, 2023
Collaborator
narendasan
left a comment
There was a problem hiding this comment.
Is 2 arbitrary or is there some sort of technical depth limit? If possible i think it would be nice to support deeper nesting like 3-4 but not a massive deal. LGTM
Contributor
Author
The choice of maximum depth of 2 is based on the data structure used to store the inputs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Relevant GraphInputs code:
TensorRT/core/ir/GraphInputs.cpp
Lines 42 to 54 in 5fa6374
Fixes #1595
Type of change
Checklist: