Skip to content

[Typing] Fix pyrefly-ignore in train.py - #2282

Merged
fegin merged 1 commit into
mainfrom
gh/fegin/66/head
Jan 28, 2026
Merged

fegin merged 1 commit into
mainfrom
gh/fegin/66/head

Conversation

@fegin

@fegin fegin commented Jan 28, 2026 •

Copy link
Copy Markdown
Contributor

The main goal is to fix train.py. Since train.py uses many components, this PR also fixes some other components as well.

Trainer.model_parts should be list[ModelProtocol] but this change will affect many files. Will do this in another PR.

Some ignores are already useless, not sure why those ignores are not removed previously using pyrefly check --remove-unused-ignores.

Total pyrefly ignores removed: 19

[ghstack-poisoned]
@fegin

fegin commented Jan 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Stack from ghstack (oldest at bottom):

fegin added a commit that referenced this pull request Jan 28, 2026
The main goal is to fix train.py. Since train.py uses many components the fix would also fix some other components as well.

Trainer.model_parts should be list[ModelProtocol] but this change will affect many files. Will do this in another PR.

Some ignores are already useless, not sure those are not removed previously using `pyrefly check --remove-unused-ignores`.

Total pyrefly ignores removed: 19


ghstack-source-id: e0924bb
ghstack-comment-id: 3812797032
Pull-Request: #2282
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 28, 2026
@fegin
fegin merged commit f0955d0 into main Jan 28, 2026
@fegin
fegin deleted the gh/fegin/66/head branch January 28, 2026 18:34
TXacs pushed a commit to McmillanTAC/torchtitan that referenced this pull request Apr 13, 2026
The main goal is to fix train.py. Since train.py uses many components,
this PR also fixes some other components as well.

Trainer.model_parts should be `list[ModelProtocol]` but this change will
affect many files. Will do this in another PR.

Some ignores are already useless, not sure why those ignores are not
removed previously using `pyrefly check --remove-unused-ignores`.

Total pyrefly ignores removed: 19
ACharacterInASimulation pushed a commit to ACharacterInASimulation/torchtitan that referenced this pull request Apr 21, 2026
The main goal is to fix train.py. Since train.py uses many components,
this PR also fixes some other components as well.

Trainer.model_parts should be `list[ModelProtocol]` but this change will
affect many files. Will do this in another PR.

Some ignores are already useless, not sure why those ignores are not
removed previously using `pyrefly check --remove-unused-ignores`.

Total pyrefly ignores removed: 19
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.

2 participants