Add pyre-ignore for Future instantiation in common.py and basic_models.py#1708
Open
vivekmig wants to merge 4 commits intometa-pytorch:masterfrom
Open
Add pyre-ignore for Future instantiation in common.py and basic_models.py#1708vivekmig wants to merge 4 commits intometa-pytorch:masterfrom
vivekmig wants to merge 4 commits intometa-pytorch:masterfrom
Conversation
added 4 commits
December 28, 2025 15:29
Summary: Reenabling OSS type checking step, skipping pyre check but keeping original mypy checks Pyre issues will be fixed in a stacked diff Differential Revision: D89819451
…1706) Summary: The `cast()` calls in the `step_sizes` and `alphas` functions within `gauss_legendre_builders()` were flagged as redundant by Pyre type checker since the values being cast are already of type `np.ndarray`. Replaced the inline cast pattern with explicit typed variable assignments. Differential Revision: D89871122
Summary: The `pyre-ignore[16]` comment for `np.core.multiarray._reconstruct` was no longer suppressing any type errors and Pyre flagged it as an unused ignore. Removed the obsolete comment while keeping the `type: ignore[attr-defined]` for mypy compatibility. Differential Revision: D89870752
…s.py Summary: Pyre reports `Call error [29]: typing.Type[Future] is not a function` when instantiating `torch.futures.Future()` because the type stubs declare it as a generic type rather than a callable class. Added `pyre-ignore[29]` comments to suppress these false positives since `Future` is callable at runtime. This affects: - `_construct_future_forward` in common.py - `BasicModel_MultiLayer_with_Future.forward` in basic_models.py Differential Revision: D89870780
Contributor
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.
Summary:
Pyre reports
Call error [29]: typing.Type[Future] is not a functionwhen instantiatingtorch.futures.Future()because the type stubs declare it as a generic type rather than a callable class.Added
pyre-ignore[29]comments to suppress these false positives sinceFutureis callable at runtime. This affects:_construct_future_forwardin common.pyBasicModel_MultiLayer_with_Future.forwardin basic_models.pyDifferential Revision: D89870780