Skip to content
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

Use general way to access and update submodules #381

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

kwen2501
Copy link
Contributor

@kwen2501 kwen2501 commented Jun 3, 2024

Stack from ghstack (oldest at bottom):

This PR fixes the issue mentioned pytorch/pytorch#126653 (comment):
"Module object has no attributed items."

The reason is, a split ModuleDict is no longer a ModuleDict.

It would be more generally applicable if we use named_children() and register_module() to access and update submodules.

This was referenced Jun 3, 2024
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 3, 2024
Copy link
Contributor

@wconstab wconstab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-stamp

@kwen2501 kwen2501 merged commit 54261c8 into gh/kwen2501/5/base Jun 3, 2024
4 checks passed
kwen2501 added a commit that referenced this pull request Jun 3, 2024
ghstack-source-id: ba1d77e5825a26632fe9b7509a88b44509cac45f
Pull Request resolved: #381
@kwen2501 kwen2501 deleted the gh/kwen2501/5/head branch June 3, 2024 20:08
tianyu-l pushed a commit to tianyu-l/torchtitan_intern24 that referenced this pull request Aug 16, 2024
ghstack-source-id: ba1d77e5825a26632fe9b7509a88b44509cac45f
Pull Request resolved: pytorch#381
tianyu-l pushed a commit that referenced this pull request Aug 16, 2024
ghstack-source-id: ba1d77e5825a26632fe9b7509a88b44509cac45f
Pull Request resolved: #381
philippguevorguian pushed a commit to YerevaNN/YNNtitan that referenced this pull request Aug 17, 2024
ghstack-source-id: ba1d77e5825a26632fe9b7509a88b44509cac45f
Pull Request resolved: pytorch#381
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants