Skip to content

[Typing] Fix pyrefly ignores in deepseek model.py - #2305

Merged
fegin merged 2 commits into
mainfrom
gh/fegin/76/head
Feb 2, 2026
Merged

fegin merged 2 commits into
mainfrom
gh/fegin/76/head

Conversation

@fegin

@fegin fegin commented Jan 30, 2026 •

Copy link
Copy Markdown
Contributor

fegin added 2 commits January 29, 2026 16:13
[ghstack-poisoned]
[ghstack-poisoned]
fegin added a commit that referenced this pull request Jan 30, 2026
As title


ghstack-source-id: 7b17642
Pull-Request: #2305
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 30, 2026
if self.moe_enabled:
# pyrefly: ignore [not-callable, missing-attribute]
self.moe.init_weights(self.weight_init_std, buffer_device)
cast(MoE, self.moe).init_weights(self.weight_init_std, buffer_device)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do we have to cast or can we do an assert isinstance check utility?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, that's a good suggestion. We should not only cast but also assert and make this a util.

@fegin
fegin changed the base branch from gh/fegin/76/base to main February 2, 2026 23:52
@fegin
fegin merged commit 4177c03 into main Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/8gpu 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.

4 participants