Skip to content

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

Closed

Conversation

guilhermeleobas
Copy link
Collaborator

@guilhermeleobas guilhermeleobas commented Apr 1, 2025

Stack from ghstack (oldest at bottom):

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

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Apr 1, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/150466

Note: Links to docs will display an error until the docs builds have been completed.

❌ 21 New Failures

As of commit 381602f with merge base 0ad2c5d (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

guilhermeleobas added a commit that referenced this pull request Apr 1, 2025
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
[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Apr 1, 2025
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
@guilhermeleobas guilhermeleobas self-assigned this Apr 1, 2025
[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Apr 1, 2025
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
@guilhermeleobas
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Apr 2, 2025
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
@pytorchmergebot
Copy link
Collaborator

Successfully rebased gh/guilhermeleobas/116/orig onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/150466)

[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Apr 2, 2025
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
[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Apr 2, 2025
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()
Copy link
Contributor

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.

  1. all the non-cpython tests
  2. 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?

Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

guilhermeleobas added a commit to guilhermeleobas/pytorch that referenced this pull request Apr 3, 2025
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
[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Apr 3, 2025
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
[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Apr 3, 2025
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
[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Apr 4, 2025
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
@guilhermeleobas
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Apr 7, 2025
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
@pytorchmergebot
Copy link
Collaborator

Successfully rebased gh/guilhermeleobas/116/orig onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/150466)

@github-actions github-actions bot deleted the gh/guilhermeleobas/116/head branch June 21, 2025 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants