Repository navigation
[Bugfix] Fix missing attribute from compile - #2675
Merged
Lucaskabela merged 1 commit intoMar 23, 2026
Merged
Conversation
Lucaskabela
marked this pull request as ready for review
March 23, 2026 18:33
Lucaskabela
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
March 23, 2026 18:33
wwwjn
approved these changes
Mar 23, 2026
| # pyrefly: ignore [missing-attribute] | ||
| for transformer_block in model.layers.named_children.values(): | ||
| # pyrefly: ignore [missing-attribute, not-callable] | ||
| for transformer_block in model.layers.values(): |
Contributor
There was a problem hiding this comment.
can we use for layer_id, transformer_block in model.layers.named_children(): which is what it is before?
Contributor
Author
There was a problem hiding this comment.
layer_id won't be used so we can just use _ - named_children() should work though
Contributor
There was a problem hiding this comment.
I see, for compile dense it was used for model.layers.register_module(layer_id, transformer_block), so does that mean model.compile here will change the module in place?
Lucaskabela
force-pushed
the
lucaskabela/named_children_fix
branch
from
March 23, 2026 20:13
90eb19f to
bd0390e
Compare
acisseJZhong
approved these changes
Mar 23, 2026
pytorch-bot Bot
pushed a commit
that referenced
this pull request
Mar 27, 2026
Minor fix in #2568 to move apply_compile to distributed/compile caused a bug due to missing `.named_children()` in this integration. So, update to fix (avoid crashing) for compile on the trainer
TXacs
pushed a commit
to McmillanTAC/torchtitan
that referenced
this pull request
Apr 13, 2026
Minor fix in pytorch#2568 to move apply_compile to distributed/compile caused a bug due to missing `.named_children()` in this integration. So, update to fix (avoid crashing) for compile on the trainer
ACharacterInASimulation
pushed a commit
to ACharacterInASimulation/torchtitan
that referenced
this pull request
Apr 21, 2026
Minor fix in pytorch#2568 to move apply_compile to distributed/compile caused a bug due to missing `.named_children()` in this integration. So, update to fix (avoid crashing) for compile on the trainer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Minor fix in #2568 to move apply_compile to distributed/compile caused a bug due to missing
.named_children()in this integration. So, update to fix (avoid crashing) for compile on the trainer