-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[iter] Add support for sequence protocol in iter(..)
#156371
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
[iter] Add support for sequence protocol in iter(..)
#156371
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/156371
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit 548d5f1 with merge base 9d32aa9 ( BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| return functools.reduce(operator.add, iterable, start) | ||
|
|
||
|
|
||
| # TODO(guilhermeleobas): use substitute_in_graph for iter() |
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.
Is this possible?
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.
I think so. There are other builtins implemented using substitute_in_graph.
ghstack-source-id: 360f5e3 Pull Request resolved: pytorch#156371
ghstack-source-id: 53e894e Pull Request resolved: pytorch#156371
|
Starting merge as part of PR stack under #156460 |
|
Starting merge as part of PR stack under #158410 |
|
Rebased |
|
Starting merge as part of PR stack under #158410 |
|
Starting merge as part of PR stack under #156460 |
|
Rebased |
|
Starting merge as part of PR stack under #158410 |
|
Starting merge as part of PR stack under #158410 |
Pull Request resolved: #156416 Approved by: https://github.com/XuehaiPan, https://github.com/zou3519 ghstack dependencies: #156371
This object keeps track when the iterator is exhausted (raise Stopiteration). Pull Request resolved: #156460 Approved by: https://github.com/zou3519 ghstack dependencies: #156371, #156416
Pull Request resolved: #158410 Approved by: https://github.com/XuehaiPan, https://github.com/zou3519 ghstack dependencies: #156371, #156416, #156460
Pull Request resolved: #156371 Approved by: https://github.com/zou3519
Pull Request resolved: #156416 Approved by: https://github.com/XuehaiPan, https://github.com/zou3519 ghstack dependencies: #156371
This object keeps track when the iterator is exhausted (raise Stopiteration). Pull Request resolved: #156460 Approved by: https://github.com/zou3519 ghstack dependencies: #156371, #156416
Pull Request resolved: #158410 Approved by: https://github.com/XuehaiPan, https://github.com/zou3519 ghstack dependencies: #156371, #156416, #156460
Stack from ghstack (oldest at bottom):
_call_iter_tuple_listwithUserDefinedObjectVariablearg #159402iter(callable, sentinel)#156416iter(..)#156371cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames @Lucaskabela @mlazos