Skip to content

Commit d8471b2

Browse files
generatedunixname89002005307016facebook-github-bot
authored andcommitted
upgrade pyre version in fbcode/vision - batch 2
Differential Revision: D42947615 fbshipit-source-id: 47b078fdf68567220e15993ab643f85771b0d340
1 parent 18c38ad commit d8471b2

File tree

14 files changed

+49
-0
lines changed

14 files changed

+49
-0
lines changed

pytorch3d/datasets/r2n2/r2n2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ def _compute_camera_calibration(self, RT):
368368
T = RT[3, :3]
369369
return R, T
370370

371+
# pyre-fixme[14]: `render` overrides method defined in `ShapeNetBase`
372+
# inconsistently.
371373
def render(
372374
self,
373375
model_ids: Optional[List[str]] = None,

pytorch3d/implicitron/evaluation/evaluator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class ImplicitronEvaluator(EvaluatorBase):
5757
def __post_init__(self):
5858
run_auto_creation(self)
5959

60+
# pyre-fixme[14]: `run` overrides method defined in `EvaluatorBase` inconsistently.
6061
def run(
6162
self,
6263
model: ImplicitronModelBase,

pytorch3d/implicitron/models/generic_model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ def __post_init__(self):
315315

316316
self.log_loss_weights()
317317

318+
# pyre-fixme[14]: `forward` overrides method defined in `ImplicitronModelBase`
319+
# inconsistently.
318320
def forward(
319321
self,
320322
*, # force keyword-only arguments

pytorch3d/implicitron/models/implicit_function/scene_representation_networks.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ def create_raymarch_function(self) -> None:
345345
def raymarch_function_tweak_args(cls, type, args: DictConfig) -> None:
346346
args.pop("latent_dim", None)
347347

348+
# pyre-fixme[14]: `forward` overrides method defined in `ImplicitFunctionBase`
349+
# inconsistently.
348350
def forward(
349351
self,
350352
*,
@@ -404,6 +406,8 @@ def hypernet_tweak_args(cls, type, args: DictConfig) -> None:
404406
args.pop("latent_dim", None)
405407
args.pop("latent_dim_hypernet", None)
406408

409+
# pyre-fixme[14]: `forward` overrides method defined in `ImplicitFunctionBase`
410+
# inconsistently.
407411
def forward(
408412
self,
409413
*,

pytorch3d/implicitron/models/model_dbir.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class ModelDBIR(ImplicitronModelBase):
4141
bg_color: Tuple[float, float, float] = (0.0, 0.0, 0.0)
4242
max_points: int = -1
4343

44+
# pyre-fixme[14]: `forward` overrides method defined in `ImplicitronModelBase`
45+
# inconsistently.
4446
def forward(
4547
self,
4648
*, # force keyword-only arguments

pytorch3d/implicitron/models/renderer/raymarcher.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ def __post_init__(self):
111111
"minimum": lambda curr, acc: torch.minimum(curr, acc),
112112
}[self.weight_function_type]
113113

114+
# pyre-fixme[14]: `forward` overrides method defined in `RaymarcherBase`
115+
# inconsistently.
114116
def forward(
115117
self,
116118
rays_densities: torch.Tensor,

pytorch3d/implicitron/models/renderer/sdf_renderer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ def create_ray_tracer(self) -> None:
6666
def requires_object_mask(self) -> bool:
6767
return True
6868

69+
# pyre-fixme[14]: `forward` overrides method defined in `BaseRenderer`
70+
# inconsistently.
6971
def forward(
7072
self,
7173
ray_bundle: ImplicitronRayBundle,

pytorch3d/implicitron/tools/video_writer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ def write_frame(
8686
or a 2-tuple defining the size of the output image.
8787
"""
8888

89+
# pyre-fixme[6]: For 1st argument expected `Union[PathLike[str], str]` but
90+
# got `Optional[str]`.
8991
outfile = os.path.join(self.cache_dir, self.regexp % self.frame_num)
9092

9193
if isinstance(frame, matplotlib.figure.Figure):
@@ -130,6 +132,8 @@ def get_video(self, quiet: bool = True) -> str:
130132
if self.frame_num == 0:
131133
return ""
132134

135+
# pyre-fixme[6]: For 1st argument expected `Union[PathLike[str], str]` but
136+
# got `Optional[str]`.
133137
regexp = os.path.join(self.cache_dir, self.regexp)
134138

135139
if shutil.which(self.ffmpeg_bin) is None:

pytorch3d/io/obj_io.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ def load_obj(
215215
"""
216216
data_dir = "./"
217217
if isinstance(f, (str, bytes, Path)):
218+
# pyre-fixme[6]: For 1st argument expected `PathLike[Variable[AnyStr <:
219+
# [str, bytes]]]` but got `Union[Path, bytes, str]`.
218220
data_dir = os.path.dirname(f)
219221
if path_manager is None:
220222
path_manager = PathManager()
@@ -296,6 +298,8 @@ class MeshObjFormat(MeshFormatInterpreter):
296298
def __init__(self) -> None:
297299
self.known_suffixes = (".obj",)
298300

301+
# pyre-fixme[14]: `read` overrides method defined in `MeshFormatInterpreter`
302+
# inconsistently.
299303
def read(
300304
self,
301305
path: PathOrStr,
@@ -320,6 +324,8 @@ def read(
320324
)
321325
return mesh
322326

327+
# pyre-fixme[14]: `save` overrides method defined in `MeshFormatInterpreter`
328+
# inconsistently.
323329
def save(
324330
self,
325331
data: Meshes,

pytorch3d/io/off_io.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,8 @@ def read(
456456
)
457457
return mesh
458458

459+
# pyre-fixme[14]: `save` overrides method defined in `MeshFormatInterpreter`
460+
# inconsistently.
459461
def save(
460462
self,
461463
data: Meshes,

0 commit comments

Comments
 (0)