-
Notifications
You must be signed in to change notification settings - Fork 22.1k
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
Fix torch._C
submodules population
#133919
Conversation
This fixes regression introduced by #132216 that on some Python runtimes failed with ``` from torch._C._dynamo.guards import GlobalStateGuard fails with ``` > from torch._C._dynamo.guards import GlobalStateGuard E ModuleNotFoundError: No module named 'torch._C._dynamo.guards'; 'torch._C._dynamo' is not a package c:\users\malfet\git\pytorch\torch\_dynamo\convert_frame.py:28: ModuleNotFoundError ```
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/133919
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 4074438 with merge base 14ddd93 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@malfet has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@malfet has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
Thanks!
@pytorchbot merge -f 'Landed internally' (Initiating merge automatically since Phabricator Diff has merged, using force because this PR might not pass merge_rules.json but landed internally) |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
This fixes regression introduced by #132216 that on some Python runtimes failed with
Simplify it by always registering submodules by its primary name and do not try to add submodules which are not part of the same namespace as parent. Otherwise module can be registered by alias, rather than by primary name.