-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Add some CPython tests to dynamo #150466
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
Add some CPython tests to dynamo #150466
Conversation
CPython tests included: * test_baseexception.py * test_cmath.py * test_complex.py * test_contextlib.py * test_dict.py * test_exceptions.py * test_float.py * test_generators.py * test_generator_stop.py * test_grammar.py * test_int_literal.py * test_int.py * test_iter.py * test_list.py * test_math.py * test_ordered_dict.py * test_raise.py * test_setcomps.py * test_set.py * test_sort.py * test_string.py * test_sys.py * test_tuple.py * test_userdict.py * test_userlist.py * test_userstring.py * unittest/test_assertions.py ghstack-source-id: 33673c9 Pull Request resolved: #150466
CPython tests included: * test_baseexception.py * test_cmath.py * test_complex.py * test_contextlib.py * test_dict.py * test_exceptions.py * test_float.py * test_generators.py * test_generator_stop.py * test_grammar.py * test_int_literal.py * test_int.py * test_iter.py * test_list.py * test_math.py * test_ordered_dict.py * test_raise.py * test_setcomps.py * test_set.py * test_sort.py * test_string.py * test_sys.py * test_tuple.py * test_userdict.py * test_userlist.py * test_userstring.py * unittest/test_assertions.py ghstack-source-id: ab3521c Pull Request resolved: #150466
CPython tests included: * test_baseexception.py * test_cmath.py * test_complex.py * test_contextlib.py * test_dict.py * test_exceptions.py * test_float.py * test_generators.py * test_generator_stop.py * test_grammar.py * test_int_literal.py * test_int.py * test_iter.py * test_list.py * test_math.py * test_ordered_dict.py * test_raise.py * test_setcomps.py * test_set.py * test_sort.py * test_string.py * test_sys.py * test_tuple.py * test_userdict.py * test_userlist.py * test_userstring.py * unittest/test_assertions.py ghstack-source-id: 36ea1ba Pull Request resolved: #150466
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
CPython tests included: * test_baseexception.py * test_cmath.py * test_complex.py * test_contextlib.py * test_dict.py * test_exceptions.py * test_float.py * test_generators.py * test_generator_stop.py * test_grammar.py * test_int_literal.py * test_int.py * test_iter.py * test_list.py * test_math.py * test_ordered_dict.py * test_raise.py * test_setcomps.py * test_set.py * test_sort.py * test_string.py * test_sys.py * test_tuple.py * test_userdict.py * test_userlist.py * test_userstring.py * unittest/test_assertions.py ghstack-source-id: b9c0f75 Pull Request resolved: #150466
Successfully rebased |
CPython tests included: * test_baseexception.py * test_cmath.py * test_complex.py * test_contextlib.py * test_dict.py * test_exceptions.py * test_float.py * test_generators.py * test_generator_stop.py * test_grammar.py * test_int_literal.py * test_int.py * test_iter.py * test_list.py * test_math.py * test_ordered_dict.py * test_raise.py * test_setcomps.py * test_set.py * test_sort.py * test_string.py * test_sys.py * test_tuple.py * test_userdict.py * test_userlist.py * test_userstring.py * unittest/test_assertions.py ghstack-source-id: 4476bf4 Pull Request resolved: #150466
CPython tests included: * test_baseexception.py * test_cmath.py * test_complex.py * test_contextlib.py * test_dict.py * test_exceptions.py * test_float.py * test_generators.py * test_generator_stop.py * test_grammar.py * test_int_literal.py * test_int.py * test_iter.py * test_list.py * test_math.py * test_ordered_dict.py * test_raise.py * test_setcomps.py * test_set.py * test_sort.py * test_string.py * test_sys.py * test_tuple.py * test_userdict.py * test_userlist.py * test_userstring.py * unittest/test_assertions.py ghstack-source-id: 9b59e4d Pull Request resolved: #150466
|
||
key = f"{self.__class__.__name__}.{self._testMethodName}" | ||
key = self._dynamo_test_key() |
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 would recommend splitting up this PR a little.
- all the non-cpython tests
- adding the cpython test files (this might be one-at-a-time, or in a batch). More of a question for @albanD I think
Also, separately, Alban, Do you think there's a better way for us to reuse the cpython tests instead of copy-pasting and modifying them into pytorch?
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.
Separating the scaffolding from the files would definitely be helpful. As this PR stands, it freezes the github UI when you look at the diff, so tricky to review :/
Also, separately, Alban, Do you think there's a better way for us to reuse the cpython tests instead of copy-pasting and modifying them into pytorch?
It depends what are the changes needed after copy-pasting?
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.
The changes involve fixing some imports and replacing unittest.TestCase
with PyTorch's TestCase
class.
CPython tests included: * test_baseexception.py * test_cmath.py * test_complex.py * test_contextlib.py * test_dict.py * test_exceptions.py * test_float.py * test_generators.py * test_generator_stop.py * test_grammar.py * test_int_literal.py * test_int.py * test_iter.py * test_list.py * test_math.py * test_ordered_dict.py * test_raise.py * test_setcomps.py * test_set.py * test_sort.py * test_string.py * test_sys.py * test_tuple.py * test_userdict.py * test_userlist.py * test_userstring.py * unittest/test_assertions.py ghstack-source-id: 9b59e4d Pull Request resolved: pytorch#150466
CPython tests included: * test_baseexception.py * test_cmath.py * test_complex.py * test_contextlib.py * test_dict.py * test_exceptions.py * test_float.py * test_generators.py * test_generator_stop.py * test_grammar.py * test_int_literal.py * test_int.py * test_iter.py * test_list.py * test_math.py * test_ordered_dict.py * test_raise.py * test_setcomps.py * test_set.py * test_sort.py * test_string.py * test_sys.py * test_tuple.py * test_userdict.py * test_userlist.py * test_userstring.py * unittest/test_assertions.py ghstack-source-id: e9a1207 Pull Request resolved: #150466
CPython tests included: * test_baseexception.py * test_cmath.py * test_complex.py * test_contextlib.py * test_dict.py * test_exceptions.py * test_float.py * test_generators.py * test_generator_stop.py * test_grammar.py * test_int_literal.py * test_int.py * test_iter.py * test_list.py * test_math.py * test_ordered_dict.py * test_raise.py * test_setcomps.py * test_set.py * test_sort.py * test_string.py * test_sys.py * test_tuple.py * test_userdict.py * test_userlist.py * test_userstring.py * unittest/test_assertions.py ghstack-source-id: 7d03bd0 Pull Request resolved: #150466
CPython tests included: * test_baseexception.py * test_cmath.py * test_complex.py * test_contextlib.py * test_dict.py * test_exceptions.py * test_exception_variations.py * test_float.py * test_generators.py * test_generator_stop.py * test_grammar.py * test_int_literal.py * test_int.py * test_iter.py * test_list.py * test_math.py * test_ordered_dict.py * test_raise.py * test_setcomps.py * test_set.py * test_sort.py * test_string.py * test_sys.py * test_tuple.py * test_userdict.py * test_userlist.py * test_userstring.py * unittest/test_assertions.py ghstack-source-id: 1840141 Pull Request resolved: #150466
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
CPython tests included: * test_baseexception.py * test_cmath.py * test_complex.py * test_contextlib.py * test_dict.py * test_exceptions.py * test_exception_variations.py * test_float.py * test_generators.py * test_generator_stop.py * test_grammar.py * test_int_literal.py * test_int.py * test_iter.py * test_list.py * test_math.py * test_ordered_dict.py * test_raise.py * test_setcomps.py * test_set.py * test_sort.py * test_string.py * test_sys.py * test_tuple.py * test_userdict.py * test_userlist.py * test_userstring.py * unittest/test_assertions.py ghstack-source-id: b3203f6 Pull Request resolved: #150466
Successfully rebased |
Stack from ghstack (oldest at bottom):
contextlib.suppress
#147990CPython tests included:
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames