Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/196526
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (8 Unrelated Failures)As of commit 8f9b873 with merge base 82e11ef ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
UNSTABLE - The following jobs are marked as unstable, possibly due to flakiness on trunk:
CRCR (non-blocking) - The following CRCR downstream CI jobs failed but are non-blocking:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
|
|
The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:
Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows. |
c22ef4d to
df2cdda
Compare
|
Thanks @lalit10 |
|
@pytorchbot merge |
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot revert -m 'Sorry for reverting your change but it seems to break dynamo trunk tests' -c nosignal test/cpython/v3_13/test_call.py::CFunctionCallsErrorMessages::test_varargs6_kw GH job link HUD commit link cc @izaitsevfb As I'm not sure why the bot didn't revert this |
|
@pytorchbot successfully started a revert job. Check the current status here. |
This reverts commit 6bb7f66. Reverted #196526 on behalf of https://github.com/huydhn due to Sorry for reverting your change but it seems to break dynamo trunk tests ([comment](#196526 (comment)))
|
@lalit10 your PR has been successfully reverted. |
This PR was reopened (likely due to being reverted), so your approval was removed. Please request another review.
GetAttrBuiltinVariable indexed positional arguments before validating getattr's signature. Too few arguments could raise an internal IndexError, extra positional arguments could be ignored, and keyword arguments were not rejected before dispatch. Non-string names could also surface as an internal Dynamo error. Use no_keywords and check_positional to match CPython's argument validation, and validate attribute names before generic lookup. Add focused regression coverage and remove the three CPython 3.13 expected-failure markers that now pass, including the two missed by the original landing. Test Plan: ```bash PYTORCH_TEST_WITH_DYNAMO=1 python test/cpython/v3_13/test_call.py PYTORCH_TEST_WITH_DYNAMO=1 python test/cpython/v3_13/test_builtin.py BuiltinTest.test_getattr python test/dynamo/test_misc.py MiscTests -k wrong_args_raises python test/dynamo/test_tp_getattro.py -k test_getattr spin quicklint ``` The tests used working-tree Python sources overlaid on CPU nightly torch 2.15.0.dev20260922. A sweep of all 83 vendored CPython suites ran 6,527 tests with no unexpected successes; test_bytes.py could not collect because _testlimitedcapi was unavailable. The three other suite errors matched the unmodified nightly. Towards pytorch#195901, Item 3. Prepared with assistance from Codex. I reviewed and approved the changes before submission.
df2cdda to
8f9b873
Compare
|
Thanks for catching this. The failure was caused by two stale expected-failure markers that I missed:
The getattr argument validation makes both tests pass, so the harness reported them as unexpected successes. I removed both markers, rebased onto the latest upstream/main, and force-pushed the update. I reran the full Python 3.13 Dynamo test_call.py suite (184 tests), the focused getattr tests, and a broader vendored CPython sweep against the latest CPU nightly. |
|
@pytorchbot merge -i |
|
This PR needs to be approved by an authorized maintainer before merge. |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 3 checks: trunk / linux-jammy-cuda13.2-py3.10-gcc11 / test (default, 13, 14, mt-l-x86aavx2-29-113-l4), inductor / unit-test / inductor-cpu-test / test (inductor_aoti_fallback, 2, 2, mt-l-x86iamx-8-64, unstable), inductor / unit-test / inductor-cpu-test / test (inductor_aoti_fallback, 1, 2, mt-l-x86iamx-8-64, unstable) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
it was disabled due to ci:sev |
|
@izaitsevfb do we need to revert this one? |
ah, no, sorry, I was replying to Huy regarding why the autorevert didn't catch the original breakage and he had to revert it manually. |
Summary
Part of #195901.
GetAttrBuiltinVariableaccessed positional arguments before validatinggetattr()calls. Too few arguments could raise an internalIndexError, excess arguments could be silently ignored, and keyword arguments were not rejected before dispatch. Non-string attribute names could also surface as internal Dynamo errors.This change uses
no_keywordsandcheck_positionalto match CPython’s argument validation, validates attribute names before generic lookup, adds focused regression coverage for invalid calls, and removes the CPython 3.13 expected-failure marker forBuiltinTest.test_getattr.Test plan
test/dynamo/test_misc.py -k wrong_args_raises: 5 passedBuiltinTest.test_getattrunder Dynamo using the installed-nightly/local-source overlay: passedtest/dynamo/test_tp_getattro.py -k test_getattr: 6 passedValidated with Python 3.13.15 and CPU nightly torch
2.15.0.dev20260908. Clang-tidy, source-built, and CI validation remain outstanding.Prepared with assistance from Codex. I reviewed and approved the changes before submission.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @jataylo @azahed98