-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Dy2stat]Add naming rule if not specific InputSpec.name #26997
[Dy2stat]Add naming rule if not specific InputSpec.name #26997
Conversation
Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds default name according to argument name from decorated function | ||
if without specificing InputSpec.name | ||
|
||
The naming rule are as followed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny English grammar issue:
"The naming rule is" or "The naming rules are".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
New features
PR changes
Others
Describe
Add naming rule if not specific InputSpec.name.
Naming rule
1. Already specific name
If InputSpec.name is not
None
, do nothing.2. Single argument single InputSpec
If each argument
x
corresponds to an InputSpec, using the argument name likex
3. Argument with list
If the arguments
inputs
corresponds to a list(InputSpec), using name likeinputs_0
,inputs_1
4. Argument with dict
If the arguments
input_dic
corresponds to a dict(InputSpec), using key as name.