From c307c64c7000cd370ff379be421bd92f6dec577b Mon Sep 17 00:00:00 2001 From: generatedunixname89002005307016 Date: Thu, 14 May 2026 20:27:36 -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. Pyrefly Upgrade - f-string fix #pyreupgrade Differential Revision: D105268300 fbshipit-source-id: 2f19758e20755944509fe14fc256002c652052a5 --- projects/implicitron_trainer/impl/optimizer_factory.py | 2 ++ pytorch3d/io/ply_io.py | 1 + 2 files changed, 3 insertions(+) diff --git a/projects/implicitron_trainer/impl/optimizer_factory.py b/projects/implicitron_trainer/impl/optimizer_factory.py index 93e1077f..34642a01 100644 --- a/projects/implicitron_trainer/impl/optimizer_factory.py +++ b/projects/implicitron_trainer/impl/optimizer_factory.py @@ -169,6 +169,7 @@ class ImplicitronOptimizerFactory(OptimizerFactoryBase): gamma=self.gamma, ) elif self.lr_policy.casefold() == "Exponential".casefold(): + # pyre-fixme[28]: Unexpected keyword argument `verbose`. scheduler = torch.optim.lr_scheduler.LambdaLR( optimizer, lambda epoch: self.gamma ** (epoch / self.exponential_lr_step_size), @@ -188,6 +189,7 @@ class ImplicitronOptimizerFactory(OptimizerFactoryBase): gamma = self.gamma ** (epoch_rest / self.exponential_lr_step_size) return gamma + # pyre-fixme[28]: Unexpected keyword argument `verbose`. scheduler = torch.optim.lr_scheduler.LambdaLR( optimizer, _get_lr, verbose=False ) diff --git a/pytorch3d/io/ply_io.py b/pytorch3d/io/ply_io.py index cf491313..db077a28 100644 --- a/pytorch3d/io/ply_io.py +++ b/pytorch3d/io/ply_io.py @@ -587,6 +587,7 @@ def _read_ply_element_binary_nolists(f, definition: _PlyElementType, big_endian: # piece = data[:, offset:end_offset].view(_PLY_TYPES[dtype].np_type) # but it fails in the general case # because of https://github.com/numpy/numpy/issues/9496. + # pyre-fixme[16]: Module `stride_tricks` has no attribute `as_strided`. piece = np.lib.stride_tricks.as_strided( data[:1, offset:end_offset].view(_PLY_TYPES[dtype].np_type), shape=(definition.count, count),