-
Notifications
You must be signed in to change notification settings - Fork 25.5k
[dynamo] Support namedtuple subclass #153982
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
Conversation
Fixes #133762. We just need to 1. handle the "fake" global scope associated with NamedTuple generated `__new__`. 2. handle `namedtuple._tuplegetter` more faithfully. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/153982
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (3 Unrelated Failures)As of commit 4c25a19 with merge base 7ae204c ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Fixes #133762. We just need to 1. handle the "fake" global scope associated with NamedTuple generated `__new__`. 2. handle `namedtuple._tuplegetter` more faithfully. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Fixes #133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. 4. use `object.__getattribute__(obj, "__dict__")[key] = value` to replay side effects onto pre-existing user-defined objects, because `object.__setattr__` can still trigger user code on via descriptors setter. ghstack-source-id: c61116a Pull Request resolved: #153982
Fixes #133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. 4. use `object.__getattribute__(obj, "__dict__")[key] = value` to replay side effects onto pre-existing user-defined objects, because `object.__setattr__` can still trigger user code on via descriptors setter. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Fixes #133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. 4. use `object.__getattribute__(obj, "__dict__")[key] = value` to replay side effects onto pre-existing user-defined objects, because `object.__setattr__` can still trigger user code on via descriptors setter. 5. fixing `is` and `is not` handling when `GetAttrVariable` is involved. This was exposed by a numpy test case under dynamo: test_broadcast_single_arg, see comments in the patch for more. ghstack-source-id: 8bbe65b Pull Request resolved: #153982
Fixes #133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. 4. use `object.__getattribute__(obj, "__dict__")[key] = value` to replay side effects onto pre-existing user-defined objects, because `object.__setattr__` can still trigger user code on via descriptors setter. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Fixes #133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. 4. use `object.__getattribute__(obj, "__dict__")[key] = value` to replay side effects onto pre-existing user-defined objects, because `object.__setattr__` can still trigger user code on via descriptors setter. 5. fixing `is` and `is not` handling when `GetAttrVariable` is involved. This was exposed by a numpy test case under dynamo: test_broadcast_single_arg, see comments in the patch for more. ghstack-source-id: 594b14c Pull Request resolved: #153982
Fixes #133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. 4. use `object.__getattribute__(obj, "__dict__")[key] = value` to replay side effects onto pre-existing user-defined objects, because `object.__setattr__` can still trigger user code on via descriptors setter. 5. fixing `is` and `is not` handling when `GetAttrVariable` is involved. This was exposed by a numpy test case under dynamo: test_broadcast_single_arg, see comments in the patch for more. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Fixes #133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. 4. use `object.__getattribute__(obj, "__dict__")[key] = value` to replay side effects onto pre-existing user-defined objects, because `object.__setattr__` can still trigger user code on via descriptors setter. ghstack-source-id: 4a18e55 Pull Request resolved: #153982
Fixes #133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. 4. use `object.__getattribute__(obj, "__dict__")[key] = value` to replay side effects onto pre-existing user-defined objects, because `object.__setattr__` can still trigger user code on via descriptors setter. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Fixes #133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. 4. use `object.__getattribute__(obj, "__dict__")[key] = value` to replay side effects onto pre-existing user-defined objects, because `object.__setattr__` can still trigger user code on via descriptors setter. ghstack-source-id: e886a52 Pull Request resolved: #153982
Fixes #133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. 4. use `object.__getattribute__(obj, "__dict__")[key] = value` to replay side effects onto pre-existing user-defined objects, because `object.__setattr__` can still trigger user code on via descriptors setter. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Fixes #133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. 4. use `object.__getattribute__(obj, "__dict__")[key] = value` to replay side effects onto pre-existing user-defined objects, because `object.__setattr__` can still trigger user code on via descriptors setter. ghstack-source-id: 5bd1192 Pull Request resolved: #153982
@StrongerXi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@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 |
Fixes pytorch#133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. Differential Revision: [D75488091](https://our.internmc.facebook.com/intern/diff/D75488091) Pull Request resolved: pytorch#153982 Approved by: https://github.com/jansel ghstack dependencies: pytorch#154176
Fixes pytorch#133762. This involves 1. support tuple subclass constructed inside compile region. 2. handle the "fake" global scope associated with NamedTuple-generated `__new__`. 3. handle `namedtuple._tuplegetter` more faithfully. Differential Revision: [D75488091](https://our.internmc.facebook.com/intern/diff/D75488091) Pull Request resolved: pytorch#153982 Approved by: https://github.com/jansel ghstack dependencies: pytorch#154176
Stack from ghstack (oldest at bottom):
__set__
#154176Fixes #133762. This involves
__new__
.namedtuple._tuplegetter
more faithfully.cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames
Differential Revision: D75488091