-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[pyfunctorch] Generate a more meaningful name for _SingleLevelAutogradFunction #90418
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
Conversation
…dFunction The API to do this is not pretty, but at least it works. Test Plan: - new test [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/90418
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit f1541f3: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…evelAutogradFunction" The API to do this is not pretty, but at least it works. Test Plan: - new test [ghstack-poisoned]
…evelAutogradFunction" The API to do this is not pretty, but at least it works. Test Plan: - new test [ghstack-poisoned]
…evelAutogradFunction" The API to do this is not pretty, but at least it works. Test Plan: - new test [ghstack-poisoned]
…evelAutogradFunction" The API to do this is not pretty, but at least it works. Test Plan: - new test [ghstack-poisoned]
…evelAutogradFunction" The API to do this is not pretty, but at least it works. Test Plan: - new test [ghstack-poisoned]
soulitzer
left a comment
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.
Nice!
| # a given name. A Tensor's .grad_fn field has a class name that is the original | ||
| # autograd.Function's name + Backward, so we do this to generate some | ||
| # meaningful name. | ||
| name = f'{autograd_function.__name__}Generated' |
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.
Don't feel super strongly about this, but just to bike-shed on the name a little, would SingleLayer be more informative than Generated to users at least since someone reading FuncGeneratedBackward might assume that Generated modifies Backward?
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.
Sorry I hit merge before seeing this. Added it to the follow-ups issue.
I agree SingleLayer makes more sense.
|
@pytorchbot merge -f "test failure is unrelated" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack:
The API to do this is not pretty, but at least it works.
Test Plan: