Skip to content

Fix pyre type errors in parallelism.py (reap OMH type-checking FAILURE) - #6089

Open
q10 wants to merge 1 commit into
pytorch:mainfrom
q10:export-D113992766
Open

Fix pyre type errors in parallelism.py (reap OMH type-checking FAILURE)#6089
q10 wants to merge 1 commit into
pytorch:mainfrom
q10:export-D113992766

Conversation

@q10

@q10 q10 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary:
moe:parallelism-type-checking has 42 consecutive FAILUREs (DISABLED_FAILING) on the
fbgemm_dev OMH dashboard with detail 'type errors!'. torch.distributed.new_group is
typed Union[int, ProcessGroup] in the stubs, but _ROUTED_EXPERTS_MP_GROUP and _EP_GROUP
are Optional[ProcessGroup], so the assignments failed pyre [9] Incompatible variable type.
Narrow the returned group with assert isinstance(group, ProcessGroup) at both call sites
(matches the file's existing assert style; new_group returns a ProcessGroup here).

Differential Revision: D113992766

Summary:
moe:parallelism-type-checking has 42 consecutive FAILUREs (DISABLED_FAILING) on the
fbgemm_dev OMH dashboard with detail 'type errors!'. torch.distributed.new_group is
typed Union[int, ProcessGroup] in the stubs, but _ROUTED_EXPERTS_MP_GROUP and _EP_GROUP
are Optional[ProcessGroup], so the assignments failed pyre [9] Incompatible variable type.
Narrow the returned group with assert isinstance(group, ProcessGroup) at both call sites
(matches the file's existing assert style; new_group returns a ProcessGroup here).

Differential Revision: D113992766
@meta-cla meta-cla Bot added the cla signed label Jul 29, 2026
@meta-codesync

meta-codesync Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@q10 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D113992766.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant