From f137c87cf91d12dc42628593729d5d1adf870fc0 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005307016 Date: Wed, 10 Jun 2026 19:55:02 -0700 Subject: [PATCH] Suppress type errors for Pyre upgrade Summary: This diff was automatically generated by the Pyre per-target upgrade tool. It adds `# pyre-fixme` or `pyrefly: ignore` comments to suppress type errors that will be introduced by an upcoming Pyre or Pyrefly release. These suppressions allow the upgrade to proceed without breaking existing code. wed - upgrade new suppression fix #pyreupgrade Differential Revision: D108188975 fbshipit-source-id: 65fb6fb0dbd6ade15bd8d85da912413eab2e41f9 --- pytorch3d/datasets/r2n2/utils.py | 2 ++ pytorch3d/ops/cameras_alignment.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pytorch3d/datasets/r2n2/utils.py b/pytorch3d/datasets/r2n2/utils.py index 0bb52ae1..a2e64850 100644 --- a/pytorch3d/datasets/r2n2/utils.py +++ b/pytorch3d/datasets/r2n2/utils.py @@ -458,6 +458,8 @@ class BlenderCamera(CamerasBase): # pragma: no cover def get_projection_transform(self, **kwargs) -> Transform3d: transform = Transform3d(device=self.device) + # pyre-fixme[29]: `Union[(self: TensorBase, dim0: int, dim1: int) -> Tensor, + # Tensor, Module]` is not a function. transform._matrix = self.K.transpose(1, 2).contiguous() return transform diff --git a/pytorch3d/ops/cameras_alignment.py b/pytorch3d/ops/cameras_alignment.py index b6575902..5986206f 100644 --- a/pytorch3d/ops/cameras_alignment.py +++ b/pytorch3d/ops/cameras_alignment.py @@ -181,6 +181,8 @@ def _align_camera_extrinsics( ``` """ # pyre-fixme[6]: For 1st argument expected `Tensor` but got `Union[Tensor, Module]`. + # pyre-fixme[29]: `Union[(self: TensorBase, dim0: int, dim1: int) -> Tensor, + # Tensor, Module]` is not a function. RRcov = torch.bmm(cameras_src.R, cameras_tgt.R.transpose(2, 1)).mean(0) U, _, V = torch.svd(RRcov) align_t_R = V @ U.t()