-
Notifications
You must be signed in to change notification settings - Fork 24.2k
[Set] Add CPython set tests #150792
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
[Set] Add CPython set tests #150792
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/150792
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 5294bbb with merge base 064f4c1 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Tests: * test_set.py ghstack-source-id: ae2723f Pull Request resolved: pytorch/pytorch#150792
@albanD, are you ok if I merge this one with the failing sanity check? |
This PR adds To run the test, use: |
@albanD, I added a diff file, to which one can see the changes I made to the wget -O test/dynamo/cpython/3_13/test_set.py https://raw.githubusercontent.com/python/cpython/refs/heads/3.13/Lib/test/test_set.py
git apply test/dynamo/cpython/3_13/test_set.diff These changes are required to run the test with Dynamo and pytest. |
Thanks for the details, skipping PR sanity check since this is auto-generated from cpython tests. |
Starting merge as part of PR stack under #152990 |
1 similar comment
Starting merge as part of PR stack under #152990 |
Starting merge as part of PR stack under #152908 |
Starting merge as part of PR stack under #152990 |
Pull Request resolved: #152987 Approved by: https://github.com/williamwen42, https://github.com/anijain2305 ghstack dependencies: #150792
Pull Request resolved: #152988 Approved by: https://github.com/anijain2305 ghstack dependencies: #150792, #152987
Pull Request resolved: #152904 Approved by: https://github.com/anijain2305 ghstack dependencies: #150792, #152987, #152988
Stack from ghstack (oldest at bottom):
set.pop()
#152907set.union
andset.update
to support *args #152989set.intersection(_update)
#152906set.difference(_update)
#152905KeyError
if elem not contained in the set #152903set.issubset
andset.issuperset
#152902TypeError
if argument is unhashable #152988Tests:
This PR adds test_set.py from the CPython 3.13 branch and ~400 files to test/dynamo_expected_failures. Most of these are expected to be fixed in upcoming PRs. Only minimal changes were made to test_set.py to enable compilation with Dynamo using the PYTORCH_TEST_WITH_DYNAMO=1 environment variable.
cc @albanD @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames