From a27755db416644273de8d70b770f1d2e68db720b Mon Sep 17 00:00:00 2001 From: Conner Nilsen Date: Mon, 4 Mar 2024 18:30:37 -0800 Subject: [PATCH] Pyre Configurationless migration for] [batch:85/112] [shard:6/N] Reviewed By: inseokhwang Differential Revision: D54438157 fbshipit-source-id: a6acfe146ed29fff82123b5e458906d4b4cee6a2 --- projects/implicitron_trainer/__init__.py | 2 ++ projects/implicitron_trainer/experiment.py | 2 ++ projects/implicitron_trainer/impl/__init__.py | 2 ++ projects/implicitron_trainer/impl/model_factory.py | 2 ++ projects/implicitron_trainer/impl/optimizer_factory.py | 2 ++ projects/implicitron_trainer/impl/training_loop.py | 2 ++ projects/implicitron_trainer/impl/utils.py | 2 ++ projects/implicitron_trainer/tests/__init__.py | 2 ++ projects/implicitron_trainer/tests/test_experiment.py | 2 ++ projects/implicitron_trainer/tests/test_optimizer_factory.py | 2 ++ projects/implicitron_trainer/tests/test_visualize.py | 2 ++ projects/implicitron_trainer/tests/utils.py | 2 ++ projects/implicitron_trainer/visualize_reconstruction.py | 2 ++ pytorch3d/__init__.py | 2 ++ pytorch3d/common/__init__.py | 2 ++ pytorch3d/common/compat.py | 2 ++ pytorch3d/common/datatypes.py | 2 ++ pytorch3d/common/linear_with_repeat.py | 2 ++ pytorch3d/common/workaround/__init__.py | 2 ++ pytorch3d/common/workaround/symeig3x3.py | 2 ++ pytorch3d/common/workaround/utils.py | 2 ++ pytorch3d/datasets/__init__.py | 2 ++ pytorch3d/datasets/r2n2/__init__.py | 2 ++ pytorch3d/datasets/r2n2/r2n2.py | 2 ++ pytorch3d/datasets/r2n2/utils.py | 2 ++ pytorch3d/datasets/shapenet/__init__.py | 2 ++ pytorch3d/datasets/shapenet/shapenet_core.py | 2 ++ pytorch3d/datasets/shapenet_base.py | 2 ++ pytorch3d/datasets/utils.py | 2 ++ pytorch3d/implicitron/__init__.py | 2 ++ pytorch3d/implicitron/dataset/__init__.py | 2 ++ pytorch3d/implicitron/dataset/blender_dataset_map_provider.py | 2 ++ pytorch3d/implicitron/dataset/data_loader_map_provider.py | 2 ++ pytorch3d/implicitron/dataset/data_source.py | 2 ++ pytorch3d/implicitron/dataset/dataset_base.py | 2 ++ pytorch3d/implicitron/dataset/dataset_map_provider.py | 2 ++ pytorch3d/implicitron/dataset/frame_data.py | 2 ++ pytorch3d/implicitron/dataset/json_index_dataset.py | 2 ++ .../implicitron/dataset/json_index_dataset_map_provider.py | 2 ++ .../implicitron/dataset/json_index_dataset_map_provider_v2.py | 2 ++ pytorch3d/implicitron/dataset/llff_dataset_map_provider.py | 2 ++ pytorch3d/implicitron/dataset/load_blender.py | 2 ++ pytorch3d/implicitron/dataset/load_llff.py | 2 ++ .../implicitron/dataset/rendered_mesh_dataset_map_provider.py | 2 ++ pytorch3d/implicitron/dataset/scene_batch_sampler.py | 2 ++ pytorch3d/implicitron/dataset/single_sequence_dataset.py | 2 ++ .../implicitron/dataset/train_eval_data_loader_provider.py | 2 ++ pytorch3d/implicitron/dataset/types.py | 2 ++ pytorch3d/implicitron/dataset/utils.py | 2 ++ pytorch3d/implicitron/dataset/visualize.py | 2 ++ pytorch3d/implicitron/eval_demo.py | 2 ++ pytorch3d/implicitron/evaluation/__init__.py | 2 ++ pytorch3d/implicitron/evaluation/evaluate_new_view_synthesis.py | 2 ++ pytorch3d/implicitron/evaluation/evaluator.py | 2 ++ pytorch3d/implicitron/models/__init__.py | 2 ++ pytorch3d/implicitron/models/base_model.py | 2 ++ pytorch3d/implicitron/models/feature_extractor/__init__.py | 2 ++ .../implicitron/models/feature_extractor/feature_extractor.py | 2 ++ .../models/feature_extractor/resnet_feature_extractor.py | 2 ++ pytorch3d/implicitron/models/generic_model.py | 2 ++ pytorch3d/implicitron/models/global_encoder/__init__.py | 2 ++ pytorch3d/implicitron/models/global_encoder/autodecoder.py | 2 ++ pytorch3d/implicitron/models/global_encoder/global_encoder.py | 2 ++ pytorch3d/implicitron/models/implicit_function/__init__.py | 2 ++ pytorch3d/implicitron/models/implicit_function/base.py | 2 ++ .../implicitron/models/implicit_function/decoding_functions.py | 2 ++ .../implicitron/models/implicit_function/idr_feature_field.py | 2 ++ .../models/implicit_function/neural_radiance_field.py | 2 ++ .../models/implicit_function/scene_representation_networks.py | 2 ++ pytorch3d/implicitron/models/implicit_function/utils.py | 2 ++ pytorch3d/implicitron/models/implicit_function/voxel_grid.py | 2 ++ .../models/implicit_function/voxel_grid_implicit_function.py | 2 ++ pytorch3d/implicitron/models/metrics.py | 2 ++ pytorch3d/implicitron/models/model_dbir.py | 2 ++ pytorch3d/implicitron/models/overfit_model.py | 2 ++ pytorch3d/implicitron/models/renderer/__init__.py | 2 ++ pytorch3d/implicitron/models/renderer/base.py | 2 ++ pytorch3d/implicitron/models/renderer/lstm_renderer.py | 2 ++ pytorch3d/implicitron/models/renderer/multipass_ea.py | 2 ++ pytorch3d/implicitron/models/renderer/ray_point_refiner.py | 2 ++ pytorch3d/implicitron/models/renderer/ray_sampler.py | 2 ++ pytorch3d/implicitron/models/renderer/ray_tracing.py | 2 ++ pytorch3d/implicitron/models/renderer/raymarcher.py | 2 ++ pytorch3d/implicitron/models/renderer/rgb_net.py | 2 ++ pytorch3d/implicitron/models/renderer/sdf_renderer.py | 2 ++ pytorch3d/implicitron/models/utils.py | 2 ++ pytorch3d/implicitron/models/view_pooler/__init__.py | 2 ++ pytorch3d/implicitron/models/view_pooler/feature_aggregator.py | 2 ++ pytorch3d/implicitron/models/view_pooler/view_pooler.py | 2 ++ pytorch3d/implicitron/models/view_pooler/view_sampler.py | 2 ++ pytorch3d/implicitron/models/visualization/__init__.py | 2 ++ pytorch3d/implicitron/models/visualization/render_flyaround.py | 2 ++ pytorch3d/implicitron/third_party/__init__.py | 2 ++ pytorch3d/implicitron/third_party/hyperlayers.py | 2 ++ pytorch3d/implicitron/third_party/pytorch_prototyping.py | 2 ++ pytorch3d/implicitron/tools/__init__.py | 2 ++ pytorch3d/implicitron/tools/camera_utils.py | 2 ++ pytorch3d/implicitron/tools/circle_fitting.py | 2 ++ pytorch3d/implicitron/tools/config.py | 2 ++ pytorch3d/implicitron/tools/depth_cleanup.py | 2 ++ pytorch3d/implicitron/tools/eval_video_trajectory.py | 2 ++ pytorch3d/implicitron/tools/image_utils.py | 2 ++ pytorch3d/implicitron/tools/metric_utils.py | 2 ++ pytorch3d/implicitron/tools/model_io.py | 2 ++ pytorch3d/implicitron/tools/point_cloud_utils.py | 2 ++ pytorch3d/implicitron/tools/rasterize_mc.py | 2 ++ pytorch3d/implicitron/tools/stats.py | 2 ++ pytorch3d/implicitron/tools/utils.py | 2 ++ pytorch3d/implicitron/tools/video_writer.py | 2 ++ pytorch3d/implicitron/tools/vis_utils.py | 2 ++ pytorch3d/io/__init__.py | 2 ++ pytorch3d/io/experimental_gltf_io.py | 2 ++ pytorch3d/io/mtl_io.py | 2 ++ pytorch3d/io/obj_io.py | 2 ++ pytorch3d/io/off_io.py | 2 ++ pytorch3d/io/pluggable.py | 2 ++ pytorch3d/io/pluggable_formats.py | 2 ++ pytorch3d/io/ply_io.py | 2 ++ pytorch3d/io/utils.py | 2 ++ pytorch3d/loss/__init__.py | 2 ++ pytorch3d/loss/chamfer.py | 2 ++ pytorch3d/loss/mesh_edge_loss.py | 2 ++ pytorch3d/loss/mesh_laplacian_smoothing.py | 2 ++ pytorch3d/loss/mesh_normal_consistency.py | 2 ++ pytorch3d/loss/point_mesh_distance.py | 2 ++ pytorch3d/ops/__init__.py | 2 ++ pytorch3d/ops/ball_query.py | 2 ++ pytorch3d/ops/cameras_alignment.py | 2 ++ pytorch3d/ops/cubify.py | 2 ++ pytorch3d/ops/graph_conv.py | 2 ++ pytorch3d/ops/interp_face_attrs.py | 2 ++ pytorch3d/ops/iou_box3d.py | 2 ++ pytorch3d/ops/knn.py | 2 ++ pytorch3d/ops/laplacian_matrices.py | 2 ++ pytorch3d/ops/marching_cubes.py | 2 ++ pytorch3d/ops/marching_cubes_data.py | 2 ++ pytorch3d/ops/mesh_face_areas_normals.py | 2 ++ pytorch3d/ops/mesh_filtering.py | 2 ++ pytorch3d/ops/packed_to_padded.py | 2 ++ pytorch3d/ops/perspective_n_points.py | 2 ++ pytorch3d/ops/points_alignment.py | 2 ++ pytorch3d/ops/points_normals.py | 2 ++ pytorch3d/ops/points_to_volumes.py | 2 ++ pytorch3d/ops/sample_farthest_points.py | 2 ++ pytorch3d/ops/sample_points_from_meshes.py | 2 ++ pytorch3d/ops/subdivide_meshes.py | 2 ++ pytorch3d/ops/utils.py | 2 ++ pytorch3d/ops/vert_align.py | 2 ++ pytorch3d/renderer/__init__.py | 2 ++ pytorch3d/renderer/blending.py | 2 ++ pytorch3d/renderer/camera_conversions.py | 2 ++ pytorch3d/renderer/camera_utils.py | 2 ++ pytorch3d/renderer/cameras.py | 2 ++ pytorch3d/renderer/compositing.py | 2 ++ pytorch3d/renderer/fisheyecameras.py | 2 ++ pytorch3d/renderer/implicit/__init__.py | 2 ++ pytorch3d/renderer/implicit/harmonic_embedding.py | 2 ++ pytorch3d/renderer/implicit/raymarching.py | 2 ++ pytorch3d/renderer/implicit/raysampling.py | 2 ++ pytorch3d/renderer/implicit/renderer.py | 2 ++ pytorch3d/renderer/implicit/sample_pdf.py | 2 ++ pytorch3d/renderer/implicit/utils.py | 2 ++ pytorch3d/renderer/lighting.py | 2 ++ pytorch3d/renderer/materials.py | 2 ++ pytorch3d/renderer/mesh/__init__.py | 2 ++ pytorch3d/renderer/mesh/clip.py | 2 ++ pytorch3d/renderer/mesh/rasterize_meshes.py | 2 ++ pytorch3d/renderer/mesh/rasterizer.py | 2 ++ pytorch3d/renderer/mesh/renderer.py | 2 ++ pytorch3d/renderer/mesh/shader.py | 2 ++ pytorch3d/renderer/mesh/shading.py | 2 ++ pytorch3d/renderer/mesh/textures.py | 2 ++ pytorch3d/renderer/mesh/utils.py | 2 ++ pytorch3d/renderer/opengl/__init__.py | 2 ++ pytorch3d/renderer/opengl/opengl_utils.py | 2 ++ pytorch3d/renderer/opengl/rasterizer_opengl.py | 2 ++ pytorch3d/renderer/points/__init__.py | 2 ++ pytorch3d/renderer/points/compositor.py | 2 ++ pytorch3d/renderer/points/pulsar/__init__.py | 2 ++ pytorch3d/renderer/points/pulsar/renderer.py | 2 ++ pytorch3d/renderer/points/pulsar/unified.py | 2 ++ pytorch3d/renderer/points/rasterize_points.py | 2 ++ pytorch3d/renderer/points/rasterizer.py | 2 ++ pytorch3d/renderer/points/renderer.py | 2 ++ pytorch3d/renderer/splatter_blend.py | 2 ++ pytorch3d/renderer/utils.py | 2 ++ pytorch3d/structures/__init__.py | 2 ++ pytorch3d/structures/meshes.py | 2 ++ pytorch3d/structures/pointclouds.py | 2 ++ pytorch3d/structures/utils.py | 2 ++ pytorch3d/structures/volumes.py | 2 ++ pytorch3d/transforms/__init__.py | 2 ++ pytorch3d/transforms/math.py | 2 ++ pytorch3d/transforms/rotation_conversions.py | 2 ++ pytorch3d/transforms/se3.py | 2 ++ pytorch3d/transforms/so3.py | 2 ++ pytorch3d/transforms/transform3d.py | 2 ++ pytorch3d/utils/__init__.py | 2 ++ pytorch3d/utils/camera_conversions.py | 2 ++ pytorch3d/utils/checkerboard.py | 2 ++ pytorch3d/utils/ico_sphere.py | 2 ++ pytorch3d/utils/torus.py | 2 ++ pytorch3d/vis/__init__.py | 2 ++ pytorch3d/vis/plotly_vis.py | 2 ++ pytorch3d/vis/texture_vis.py | 2 ++ 205 files changed, 410 insertions(+) diff --git a/projects/implicitron_trainer/__init__.py b/projects/implicitron_trainer/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/projects/implicitron_trainer/__init__.py +++ b/projects/implicitron_trainer/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/projects/implicitron_trainer/experiment.py b/projects/implicitron_trainer/experiment.py index 797660c8..bc826512 100755 --- a/projects/implicitron_trainer/experiment.py +++ b/projects/implicitron_trainer/experiment.py @@ -5,6 +5,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """" This file is the entry point for launching experiments with Implicitron. diff --git a/projects/implicitron_trainer/impl/__init__.py b/projects/implicitron_trainer/impl/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/projects/implicitron_trainer/impl/__init__.py +++ b/projects/implicitron_trainer/impl/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/projects/implicitron_trainer/impl/model_factory.py b/projects/implicitron_trainer/impl/model_factory.py index 9c8ea9da..3c6ceb91 100644 --- a/projects/implicitron_trainer/impl/model_factory.py +++ b/projects/implicitron_trainer/impl/model_factory.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging import os from typing import Optional diff --git a/projects/implicitron_trainer/impl/optimizer_factory.py b/projects/implicitron_trainer/impl/optimizer_factory.py index 1ec31653..503df309 100644 --- a/projects/implicitron_trainer/impl/optimizer_factory.py +++ b/projects/implicitron_trainer/impl/optimizer_factory.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import inspect import logging import os diff --git a/projects/implicitron_trainer/impl/training_loop.py b/projects/implicitron_trainer/impl/training_loop.py index 57917cc8..dfc36cab 100644 --- a/projects/implicitron_trainer/impl/training_loop.py +++ b/projects/implicitron_trainer/impl/training_loop.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging import os import time diff --git a/projects/implicitron_trainer/impl/utils.py b/projects/implicitron_trainer/impl/utils.py index 4fac4463..90c8071d 100644 --- a/projects/implicitron_trainer/impl/utils.py +++ b/projects/implicitron_trainer/impl/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import random diff --git a/projects/implicitron_trainer/tests/__init__.py b/projects/implicitron_trainer/tests/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/projects/implicitron_trainer/tests/__init__.py +++ b/projects/implicitron_trainer/tests/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/projects/implicitron_trainer/tests/test_experiment.py b/projects/implicitron_trainer/tests/test_experiment.py index 486d2134..46ceb922 100644 --- a/projects/implicitron_trainer/tests/test_experiment.py +++ b/projects/implicitron_trainer/tests/test_experiment.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import os import tempfile import unittest diff --git a/projects/implicitron_trainer/tests/test_optimizer_factory.py b/projects/implicitron_trainer/tests/test_optimizer_factory.py index ef7517fe..07cb93fc 100644 --- a/projects/implicitron_trainer/tests/test_optimizer_factory.py +++ b/projects/implicitron_trainer/tests/test_optimizer_factory.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging import os import unittest diff --git a/projects/implicitron_trainer/tests/test_visualize.py b/projects/implicitron_trainer/tests/test_visualize.py index d414a05d..0b076ea4 100644 --- a/projects/implicitron_trainer/tests/test_visualize.py +++ b/projects/implicitron_trainer/tests/test_visualize.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import os import unittest diff --git a/projects/implicitron_trainer/tests/utils.py b/projects/implicitron_trainer/tests/utils.py index 4b6d84ae..509b7241 100644 --- a/projects/implicitron_trainer/tests/utils.py +++ b/projects/implicitron_trainer/tests/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import contextlib import logging import os diff --git a/projects/implicitron_trainer/visualize_reconstruction.py b/projects/implicitron_trainer/visualize_reconstruction.py index 618d1aa6..707bd286 100644 --- a/projects/implicitron_trainer/visualize_reconstruction.py +++ b/projects/implicitron_trainer/visualize_reconstruction.py @@ -5,6 +5,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """ Script to visualize a previously trained model. Example call: diff --git a/pytorch3d/__init__.py b/pytorch3d/__init__.py index dc4b478e..e3f450f8 100644 --- a/pytorch3d/__init__.py +++ b/pytorch3d/__init__.py @@ -4,4 +4,6 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + __version__ = "0.7.6" diff --git a/pytorch3d/common/__init__.py b/pytorch3d/common/__init__.py index 8f5d84e9..d71a6bba 100644 --- a/pytorch3d/common/__init__.py +++ b/pytorch3d/common/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .datatypes import Device, get_device, make_device diff --git a/pytorch3d/common/compat.py b/pytorch3d/common/compat.py index 5c155f12..e90680c8 100644 --- a/pytorch3d/common/compat.py +++ b/pytorch3d/common/compat.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Sequence, Tuple, Union import torch diff --git a/pytorch3d/common/datatypes.py b/pytorch3d/common/datatypes.py index 03fe3efc..b5aa08d9 100644 --- a/pytorch3d/common/datatypes.py +++ b/pytorch3d/common/datatypes.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Optional, Union import torch diff --git a/pytorch3d/common/linear_with_repeat.py b/pytorch3d/common/linear_with_repeat.py index 2dd477be..4b234ed1 100644 --- a/pytorch3d/common/linear_with_repeat.py +++ b/pytorch3d/common/linear_with_repeat.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import math from typing import Tuple diff --git a/pytorch3d/common/workaround/__init__.py b/pytorch3d/common/workaround/__init__.py index 64c5d3fa..92ecd047 100644 --- a/pytorch3d/common/workaround/__init__.py +++ b/pytorch3d/common/workaround/__init__.py @@ -4,5 +4,7 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .symeig3x3 import symeig3x3 from .utils import _safe_det_3x3 diff --git a/pytorch3d/common/workaround/symeig3x3.py b/pytorch3d/common/workaround/symeig3x3.py index 479f8b00..03d27359 100644 --- a/pytorch3d/common/workaround/symeig3x3.py +++ b/pytorch3d/common/workaround/symeig3x3.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import math from typing import Optional, Tuple diff --git a/pytorch3d/common/workaround/utils.py b/pytorch3d/common/workaround/utils.py index 6cd69412..412f40a4 100644 --- a/pytorch3d/common/workaround/utils.py +++ b/pytorch3d/common/workaround/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch diff --git a/pytorch3d/datasets/__init__.py b/pytorch3d/datasets/__init__.py index 3dbee1eb..47f8852b 100644 --- a/pytorch3d/datasets/__init__.py +++ b/pytorch3d/datasets/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .r2n2 import BlenderCamera, collate_batched_R2N2, R2N2, render_cubified_voxels from .shapenet import ShapeNetCore from .utils import collate_batched_meshes diff --git a/pytorch3d/datasets/r2n2/__init__.py b/pytorch3d/datasets/r2n2/__init__.py index d2593d04..0b554d84 100644 --- a/pytorch3d/datasets/r2n2/__init__.py +++ b/pytorch3d/datasets/r2n2/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .r2n2 import R2N2 from .utils import BlenderCamera, collate_batched_R2N2, render_cubified_voxels diff --git a/pytorch3d/datasets/r2n2/r2n2.py b/pytorch3d/datasets/r2n2/r2n2.py index 6f93ad76..c4e182f9 100644 --- a/pytorch3d/datasets/r2n2/r2n2.py +++ b/pytorch3d/datasets/r2n2/r2n2.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import json import warnings from os import path diff --git a/pytorch3d/datasets/r2n2/utils.py b/pytorch3d/datasets/r2n2/utils.py index c7b80537..0bb52ae1 100644 --- a/pytorch3d/datasets/r2n2/utils.py +++ b/pytorch3d/datasets/r2n2/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import math from typing import Dict, List diff --git a/pytorch3d/datasets/shapenet/__init__.py b/pytorch3d/datasets/shapenet/__init__.py index 295ec793..1c2f532e 100644 --- a/pytorch3d/datasets/shapenet/__init__.py +++ b/pytorch3d/datasets/shapenet/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .shapenet_core import ShapeNetCore diff --git a/pytorch3d/datasets/shapenet/shapenet_core.py b/pytorch3d/datasets/shapenet/shapenet_core.py index 61908414..70524b15 100644 --- a/pytorch3d/datasets/shapenet/shapenet_core.py +++ b/pytorch3d/datasets/shapenet/shapenet_core.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import json import os import warnings diff --git a/pytorch3d/datasets/shapenet_base.py b/pytorch3d/datasets/shapenet_base.py index 7160ca6c..d90bea67 100644 --- a/pytorch3d/datasets/shapenet_base.py +++ b/pytorch3d/datasets/shapenet_base.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings from typing import Dict, List, Optional, Tuple diff --git a/pytorch3d/datasets/utils.py b/pytorch3d/datasets/utils.py index 88aafac1..f651604c 100644 --- a/pytorch3d/datasets/utils.py +++ b/pytorch3d/datasets/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Dict, List from pytorch3d.renderer.mesh import TexturesAtlas diff --git a/pytorch3d/implicitron/__init__.py b/pytorch3d/implicitron/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/pytorch3d/implicitron/__init__.py +++ b/pytorch3d/implicitron/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/pytorch3d/implicitron/dataset/__init__.py b/pytorch3d/implicitron/dataset/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/pytorch3d/implicitron/dataset/__init__.py +++ b/pytorch3d/implicitron/dataset/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/pytorch3d/implicitron/dataset/blender_dataset_map_provider.py b/pytorch3d/implicitron/dataset/blender_dataset_map_provider.py index 2eab2560..3db89a81 100644 --- a/pytorch3d/implicitron/dataset/blender_dataset_map_provider.py +++ b/pytorch3d/implicitron/dataset/blender_dataset_map_provider.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch from pytorch3d.implicitron.tools.config import registry diff --git a/pytorch3d/implicitron/dataset/data_loader_map_provider.py b/pytorch3d/implicitron/dataset/data_loader_map_provider.py index 6c0436ad..1e33887b 100644 --- a/pytorch3d/implicitron/dataset/data_loader_map_provider.py +++ b/pytorch3d/implicitron/dataset/data_loader_map_provider.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from dataclasses import dataclass from enum import Enum from typing import Iterator, List, Optional, Tuple diff --git a/pytorch3d/implicitron/dataset/data_source.py b/pytorch3d/implicitron/dataset/data_source.py index a7989ac9..5c789e7d 100644 --- a/pytorch3d/implicitron/dataset/data_source.py +++ b/pytorch3d/implicitron/dataset/data_source.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Optional, Tuple from pytorch3d.implicitron.tools.config import ( diff --git a/pytorch3d/implicitron/dataset/dataset_base.py b/pytorch3d/implicitron/dataset/dataset_base.py index 033b170c..4b082788 100644 --- a/pytorch3d/implicitron/dataset/dataset_base.py +++ b/pytorch3d/implicitron/dataset/dataset_base.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from collections import defaultdict from dataclasses import dataclass from typing import ( diff --git a/pytorch3d/implicitron/dataset/dataset_map_provider.py b/pytorch3d/implicitron/dataset/dataset_map_provider.py index 91274f18..7133b364 100644 --- a/pytorch3d/implicitron/dataset/dataset_map_provider.py +++ b/pytorch3d/implicitron/dataset/dataset_map_provider.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging import os from dataclasses import dataclass diff --git a/pytorch3d/implicitron/dataset/frame_data.py b/pytorch3d/implicitron/dataset/frame_data.py index e5fbb6c9..e4321549 100644 --- a/pytorch3d/implicitron/dataset/frame_data.py +++ b/pytorch3d/implicitron/dataset/frame_data.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import os from abc import ABC, abstractmethod from collections import defaultdict diff --git a/pytorch3d/implicitron/dataset/json_index_dataset.py b/pytorch3d/implicitron/dataset/json_index_dataset.py index fbbd564e..69a7859a 100644 --- a/pytorch3d/implicitron/dataset/json_index_dataset.py +++ b/pytorch3d/implicitron/dataset/json_index_dataset.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import copy import functools import gzip diff --git a/pytorch3d/implicitron/dataset/json_index_dataset_map_provider.py b/pytorch3d/implicitron/dataset/json_index_dataset_map_provider.py index 53170871..106a2e4c 100644 --- a/pytorch3d/implicitron/dataset/json_index_dataset_map_provider.py +++ b/pytorch3d/implicitron/dataset/json_index_dataset_map_provider.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import json import os diff --git a/pytorch3d/implicitron/dataset/json_index_dataset_map_provider_v2.py b/pytorch3d/implicitron/dataset/json_index_dataset_map_provider_v2.py index d8790d35..f74f844c 100644 --- a/pytorch3d/implicitron/dataset/json_index_dataset_map_provider_v2.py +++ b/pytorch3d/implicitron/dataset/json_index_dataset_map_provider_v2.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import copy import json diff --git a/pytorch3d/implicitron/dataset/llff_dataset_map_provider.py b/pytorch3d/implicitron/dataset/llff_dataset_map_provider.py index 8a4993e1..0c8af9ab 100644 --- a/pytorch3d/implicitron/dataset/llff_dataset_map_provider.py +++ b/pytorch3d/implicitron/dataset/llff_dataset_map_provider.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import numpy as np import torch diff --git a/pytorch3d/implicitron/dataset/load_blender.py b/pytorch3d/implicitron/dataset/load_blender.py index 42b9cb53..84f08312 100644 --- a/pytorch3d/implicitron/dataset/load_blender.py +++ b/pytorch3d/implicitron/dataset/load_blender.py @@ -1,6 +1,8 @@ # @lint-ignore-every LICENSELINT # Adapted from https://github.com/bmild/nerf/blob/master/load_blender.py # Copyright (c) 2020 bmild + +# pyre-unsafe import json import os diff --git a/pytorch3d/implicitron/dataset/load_llff.py b/pytorch3d/implicitron/dataset/load_llff.py index d19337a9..d29b650b 100644 --- a/pytorch3d/implicitron/dataset/load_llff.py +++ b/pytorch3d/implicitron/dataset/load_llff.py @@ -1,6 +1,8 @@ # @lint-ignore-every LICENSELINT # Adapted from https://github.com/bmild/nerf/blob/master/load_llff.py # Copyright (c) 2020 bmild + +# pyre-unsafe import logging import os import warnings diff --git a/pytorch3d/implicitron/dataset/rendered_mesh_dataset_map_provider.py b/pytorch3d/implicitron/dataset/rendered_mesh_dataset_map_provider.py index 3ce99fb5..56d86f98 100644 --- a/pytorch3d/implicitron/dataset/rendered_mesh_dataset_map_provider.py +++ b/pytorch3d/implicitron/dataset/rendered_mesh_dataset_map_provider.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from os.path import dirname, join, realpath from typing import Optional, Tuple diff --git a/pytorch3d/implicitron/dataset/scene_batch_sampler.py b/pytorch3d/implicitron/dataset/scene_batch_sampler.py index f724fd07..2ce7e271 100644 --- a/pytorch3d/implicitron/dataset/scene_batch_sampler.py +++ b/pytorch3d/implicitron/dataset/scene_batch_sampler.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings from collections import Counter diff --git a/pytorch3d/implicitron/dataset/single_sequence_dataset.py b/pytorch3d/implicitron/dataset/single_sequence_dataset.py index 1090faa1..d99b44e0 100644 --- a/pytorch3d/implicitron/dataset/single_sequence_dataset.py +++ b/pytorch3d/implicitron/dataset/single_sequence_dataset.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + # This file defines a base class for dataset map providers which # provide data for a single scene. diff --git a/pytorch3d/implicitron/dataset/train_eval_data_loader_provider.py b/pytorch3d/implicitron/dataset/train_eval_data_loader_provider.py index 4640feb2..c7c0c39a 100644 --- a/pytorch3d/implicitron/dataset/train_eval_data_loader_provider.py +++ b/pytorch3d/implicitron/dataset/train_eval_data_loader_provider.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging from typing import Any, Dict, Optional, Tuple diff --git a/pytorch3d/implicitron/dataset/types.py b/pytorch3d/implicitron/dataset/types.py index 58eac677..faf8c790 100644 --- a/pytorch3d/implicitron/dataset/types.py +++ b/pytorch3d/implicitron/dataset/types.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import dataclasses import gzip diff --git a/pytorch3d/implicitron/dataset/utils.py b/pytorch3d/implicitron/dataset/utils.py index 01573a1a..b8c09518 100644 --- a/pytorch3d/implicitron/dataset/utils.py +++ b/pytorch3d/implicitron/dataset/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import functools import warnings diff --git a/pytorch3d/implicitron/dataset/visualize.py b/pytorch3d/implicitron/dataset/visualize.py index 9f2f5c4e..557f7b43 100644 --- a/pytorch3d/implicitron/dataset/visualize.py +++ b/pytorch3d/implicitron/dataset/visualize.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import cast, Optional, Tuple import torch diff --git a/pytorch3d/implicitron/eval_demo.py b/pytorch3d/implicitron/eval_demo.py index 91e69694..9b0e14d7 100644 --- a/pytorch3d/implicitron/eval_demo.py +++ b/pytorch3d/implicitron/eval_demo.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import dataclasses import os diff --git a/pytorch3d/implicitron/evaluation/__init__.py b/pytorch3d/implicitron/evaluation/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/pytorch3d/implicitron/evaluation/__init__.py +++ b/pytorch3d/implicitron/evaluation/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/pytorch3d/implicitron/evaluation/evaluate_new_view_synthesis.py b/pytorch3d/implicitron/evaluation/evaluate_new_view_synthesis.py index 6f13fd00..05b893d7 100644 --- a/pytorch3d/implicitron/evaluation/evaluate_new_view_synthesis.py +++ b/pytorch3d/implicitron/evaluation/evaluate_new_view_synthesis.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import copy import warnings diff --git a/pytorch3d/implicitron/evaluation/evaluator.py b/pytorch3d/implicitron/evaluation/evaluator.py index e869a656..84306997 100644 --- a/pytorch3d/implicitron/evaluation/evaluator.py +++ b/pytorch3d/implicitron/evaluation/evaluator.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import copy import json import logging diff --git a/pytorch3d/implicitron/models/__init__.py b/pytorch3d/implicitron/models/__init__.py index 5a3ab83f..7dc294bf 100644 --- a/pytorch3d/implicitron/models/__init__.py +++ b/pytorch3d/implicitron/models/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + # Allows to register the models # see: pytorch3d.implicitron.tools.config.registry:register from pytorch3d.implicitron.models.generic_model import GenericModel diff --git a/pytorch3d/implicitron/models/base_model.py b/pytorch3d/implicitron/models/base_model.py index bd48bf7f..ff645fd7 100644 --- a/pytorch3d/implicitron/models/base_model.py +++ b/pytorch3d/implicitron/models/base_model.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from dataclasses import dataclass, field from typing import Any, Dict, List, Optional diff --git a/pytorch3d/implicitron/models/feature_extractor/__init__.py b/pytorch3d/implicitron/models/feature_extractor/__init__.py index 9141562c..6c47703b 100644 --- a/pytorch3d/implicitron/models/feature_extractor/__init__.py +++ b/pytorch3d/implicitron/models/feature_extractor/__init__.py @@ -4,4 +4,6 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .feature_extractor import FeatureExtractorBase diff --git a/pytorch3d/implicitron/models/feature_extractor/feature_extractor.py b/pytorch3d/implicitron/models/feature_extractor/feature_extractor.py index 9ce7f5e5..fd71b1e2 100644 --- a/pytorch3d/implicitron/models/feature_extractor/feature_extractor.py +++ b/pytorch3d/implicitron/models/feature_extractor/feature_extractor.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Any, Dict, Optional import torch diff --git a/pytorch3d/implicitron/models/feature_extractor/resnet_feature_extractor.py b/pytorch3d/implicitron/models/feature_extractor/resnet_feature_extractor.py index ca7cefd0..08c86489 100644 --- a/pytorch3d/implicitron/models/feature_extractor/resnet_feature_extractor.py +++ b/pytorch3d/implicitron/models/feature_extractor/resnet_feature_extractor.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging import math from typing import Any, Dict, Optional, Tuple diff --git a/pytorch3d/implicitron/models/generic_model.py b/pytorch3d/implicitron/models/generic_model.py index a8df7dbb..06a8f2b7 100644 --- a/pytorch3d/implicitron/models/generic_model.py +++ b/pytorch3d/implicitron/models/generic_model.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + # Note: The #noqa comments below are for unused imports of pluggable implementations # which are part of implicitron. They ensure that the registry is prepopulated. diff --git a/pytorch3d/implicitron/models/global_encoder/__init__.py b/pytorch3d/implicitron/models/global_encoder/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/pytorch3d/implicitron/models/global_encoder/__init__.py +++ b/pytorch3d/implicitron/models/global_encoder/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/pytorch3d/implicitron/models/global_encoder/autodecoder.py b/pytorch3d/implicitron/models/global_encoder/autodecoder.py index 764785bc..0d941bf6 100644 --- a/pytorch3d/implicitron/models/global_encoder/autodecoder.py +++ b/pytorch3d/implicitron/models/global_encoder/autodecoder.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings from collections import defaultdict from typing import Dict, List, Optional, Union diff --git a/pytorch3d/implicitron/models/global_encoder/global_encoder.py b/pytorch3d/implicitron/models/global_encoder/global_encoder.py index bb7defac..0f62a0b7 100644 --- a/pytorch3d/implicitron/models/global_encoder/global_encoder.py +++ b/pytorch3d/implicitron/models/global_encoder/global_encoder.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import List, Optional, Union import torch diff --git a/pytorch3d/implicitron/models/implicit_function/__init__.py b/pytorch3d/implicitron/models/implicit_function/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/pytorch3d/implicitron/models/implicit_function/__init__.py +++ b/pytorch3d/implicitron/models/implicit_function/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/pytorch3d/implicitron/models/implicit_function/base.py b/pytorch3d/implicitron/models/implicit_function/base.py index 7cd67ede..d8d182dd 100644 --- a/pytorch3d/implicitron/models/implicit_function/base.py +++ b/pytorch3d/implicitron/models/implicit_function/base.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from abc import ABC, abstractmethod from typing import Optional diff --git a/pytorch3d/implicitron/models/implicit_function/decoding_functions.py b/pytorch3d/implicitron/models/implicit_function/decoding_functions.py index e7b3dadf..437cdbdd 100644 --- a/pytorch3d/implicitron/models/implicit_function/decoding_functions.py +++ b/pytorch3d/implicitron/models/implicit_function/decoding_functions.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """ This file contains - modules which get used by ImplicitFunction objects for decoding an embedding defined in diff --git a/pytorch3d/implicitron/models/implicit_function/idr_feature_field.py b/pytorch3d/implicitron/models/implicit_function/idr_feature_field.py index 328c0c2e..be98b878 100644 --- a/pytorch3d/implicitron/models/implicit_function/idr_feature_field.py +++ b/pytorch3d/implicitron/models/implicit_function/idr_feature_field.py @@ -2,6 +2,8 @@ # Adapted from https://github.com/lioryariv/idr/blob/main/code/model/ # implicit_differentiable_renderer.py # Copyright (c) 2020 Lior Yariv + +# pyre-unsafe import math from typing import Optional, Tuple diff --git a/pytorch3d/implicitron/models/implicit_function/neural_radiance_field.py b/pytorch3d/implicitron/models/implicit_function/neural_radiance_field.py index d61d10d1..00f3aa65 100644 --- a/pytorch3d/implicitron/models/implicit_function/neural_radiance_field.py +++ b/pytorch3d/implicitron/models/implicit_function/neural_radiance_field.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging from typing import Optional, Tuple diff --git a/pytorch3d/implicitron/models/implicit_function/scene_representation_networks.py b/pytorch3d/implicitron/models/implicit_function/scene_representation_networks.py index 9ac0992c..6a605f06 100644 --- a/pytorch3d/implicitron/models/implicit_function/scene_representation_networks.py +++ b/pytorch3d/implicitron/models/implicit_function/scene_representation_networks.py @@ -1,6 +1,8 @@ # @lint-ignore-every LICENSELINT # Adapted from https://github.com/vsitzmann/scene-representation-networks # Copyright (c) 2019 Vincent Sitzmann + +# pyre-unsafe from typing import Any, cast, Optional, Tuple import torch diff --git a/pytorch3d/implicitron/models/implicit_function/utils.py b/pytorch3d/implicitron/models/implicit_function/utils.py index 25ec3fcb..ec453f43 100644 --- a/pytorch3d/implicitron/models/implicit_function/utils.py +++ b/pytorch3d/implicitron/models/implicit_function/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Callable, Optional import torch diff --git a/pytorch3d/implicitron/models/implicit_function/voxel_grid.py b/pytorch3d/implicitron/models/implicit_function/voxel_grid.py index 8115d072..0c106b2a 100644 --- a/pytorch3d/implicitron/models/implicit_function/voxel_grid.py +++ b/pytorch3d/implicitron/models/implicit_function/voxel_grid.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """ This file contains classes that implement Voxel grids, both in their full resolution as in the factorized form. There are two factorized forms implemented, Tensor rank decomposition diff --git a/pytorch3d/implicitron/models/implicit_function/voxel_grid_implicit_function.py b/pytorch3d/implicitron/models/implicit_function/voxel_grid_implicit_function.py index b4132046..6b9b27b7 100644 --- a/pytorch3d/implicitron/models/implicit_function/voxel_grid_implicit_function.py +++ b/pytorch3d/implicitron/models/implicit_function/voxel_grid_implicit_function.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging import math import warnings diff --git a/pytorch3d/implicitron/models/metrics.py b/pytorch3d/implicitron/models/metrics.py index edd4b940..0e1a3b62 100644 --- a/pytorch3d/implicitron/models/metrics.py +++ b/pytorch3d/implicitron/models/metrics.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings from typing import Any, Dict, Optional diff --git a/pytorch3d/implicitron/models/model_dbir.py b/pytorch3d/implicitron/models/model_dbir.py index 4f470a6e..496f9ed1 100644 --- a/pytorch3d/implicitron/models/model_dbir.py +++ b/pytorch3d/implicitron/models/model_dbir.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Any, Dict, List, Optional, Tuple diff --git a/pytorch3d/implicitron/models/overfit_model.py b/pytorch3d/implicitron/models/overfit_model.py index 0b6d590c..f1518e77 100644 --- a/pytorch3d/implicitron/models/overfit_model.py +++ b/pytorch3d/implicitron/models/overfit_model.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + # Note: The #noqa comments below are for unused imports of pluggable implementations # which are part of implicitron. They ensure that the registry is prepopulated. diff --git a/pytorch3d/implicitron/models/renderer/__init__.py b/pytorch3d/implicitron/models/renderer/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/pytorch3d/implicitron/models/renderer/__init__.py +++ b/pytorch3d/implicitron/models/renderer/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/pytorch3d/implicitron/models/renderer/base.py b/pytorch3d/implicitron/models/renderer/base.py index 3e891bf7..34901670 100644 --- a/pytorch3d/implicitron/models/renderer/base.py +++ b/pytorch3d/implicitron/models/renderer/base.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/pytorch3d/implicitron/models/renderer/lstm_renderer.py b/pytorch3d/implicitron/models/renderer/lstm_renderer.py index 19848ed6..0e95dc63 100644 --- a/pytorch3d/implicitron/models/renderer/lstm_renderer.py +++ b/pytorch3d/implicitron/models/renderer/lstm_renderer.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import copy import logging from typing import List, Optional, Tuple diff --git a/pytorch3d/implicitron/models/renderer/multipass_ea.py b/pytorch3d/implicitron/models/renderer/multipass_ea.py index 92042e13..905027b0 100644 --- a/pytorch3d/implicitron/models/renderer/multipass_ea.py +++ b/pytorch3d/implicitron/models/renderer/multipass_ea.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import List import torch diff --git a/pytorch3d/implicitron/models/renderer/ray_point_refiner.py b/pytorch3d/implicitron/models/renderer/ray_point_refiner.py index b71574d2..90f56c3c 100644 --- a/pytorch3d/implicitron/models/renderer/ray_point_refiner.py +++ b/pytorch3d/implicitron/models/renderer/ray_point_refiner.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import copy import torch diff --git a/pytorch3d/implicitron/models/renderer/ray_sampler.py b/pytorch3d/implicitron/models/renderer/ray_sampler.py index f64cdc70..11ee27b0 100644 --- a/pytorch3d/implicitron/models/renderer/ray_sampler.py +++ b/pytorch3d/implicitron/models/renderer/ray_sampler.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Optional, Tuple import torch diff --git a/pytorch3d/implicitron/models/renderer/ray_tracing.py b/pytorch3d/implicitron/models/renderer/ray_tracing.py index 417bc869..9ad46a83 100644 --- a/pytorch3d/implicitron/models/renderer/ray_tracing.py +++ b/pytorch3d/implicitron/models/renderer/ray_tracing.py @@ -2,6 +2,8 @@ # Adapted from https://github.com/lioryariv/idr # Copyright (c) 2020 Lior Yariv +# pyre-unsafe + from typing import Any, Callable, Tuple import torch diff --git a/pytorch3d/implicitron/models/renderer/raymarcher.py b/pytorch3d/implicitron/models/renderer/raymarcher.py index 9c6addf1..5544590c 100644 --- a/pytorch3d/implicitron/models/renderer/raymarcher.py +++ b/pytorch3d/implicitron/models/renderer/raymarcher.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Any, Callable, Dict, Optional, Tuple import torch diff --git a/pytorch3d/implicitron/models/renderer/rgb_net.py b/pytorch3d/implicitron/models/renderer/rgb_net.py index 6d41d216..de253896 100644 --- a/pytorch3d/implicitron/models/renderer/rgb_net.py +++ b/pytorch3d/implicitron/models/renderer/rgb_net.py @@ -3,6 +3,8 @@ # https://github.com/lioryariv/idr/ # Copyright (c) 2020 Lior Yariv +# pyre-unsafe + import logging from typing import List, Tuple diff --git a/pytorch3d/implicitron/models/renderer/sdf_renderer.py b/pytorch3d/implicitron/models/renderer/sdf_renderer.py index 95de20f1..67ee7509 100644 --- a/pytorch3d/implicitron/models/renderer/sdf_renderer.py +++ b/pytorch3d/implicitron/models/renderer/sdf_renderer.py @@ -2,6 +2,8 @@ # Adapted from https://github.com/lioryariv/idr/blob/main/code/model/ # implicit_differentiable_renderer.py # Copyright (c) 2020 Lior Yariv + +# pyre-unsafe import functools from typing import List, Optional, Tuple diff --git a/pytorch3d/implicitron/models/utils.py b/pytorch3d/implicitron/models/utils.py index b2f7dc66..6132e9ad 100644 --- a/pytorch3d/implicitron/models/utils.py +++ b/pytorch3d/implicitron/models/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + # Note: The #noqa comments below are for unused imports of pluggable implementations # which are part of implicitron. They ensure that the registry is prepopulated. diff --git a/pytorch3d/implicitron/models/view_pooler/__init__.py b/pytorch3d/implicitron/models/view_pooler/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/pytorch3d/implicitron/models/view_pooler/__init__.py +++ b/pytorch3d/implicitron/models/view_pooler/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/pytorch3d/implicitron/models/view_pooler/feature_aggregator.py b/pytorch3d/implicitron/models/view_pooler/feature_aggregator.py index bd981739..c223be22 100644 --- a/pytorch3d/implicitron/models/view_pooler/feature_aggregator.py +++ b/pytorch3d/implicitron/models/view_pooler/feature_aggregator.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from abc import ABC, abstractmethod from enum import Enum from typing import Dict, Optional, Sequence, Tuple, Union diff --git a/pytorch3d/implicitron/models/view_pooler/view_pooler.py b/pytorch3d/implicitron/models/view_pooler/view_pooler.py index a47ef72d..ec6c4666 100644 --- a/pytorch3d/implicitron/models/view_pooler/view_pooler.py +++ b/pytorch3d/implicitron/models/view_pooler/view_pooler.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Dict, List, Optional, Union import torch diff --git a/pytorch3d/implicitron/models/view_pooler/view_sampler.py b/pytorch3d/implicitron/models/view_pooler/view_sampler.py index 56f91ed2..dabb8b7f 100644 --- a/pytorch3d/implicitron/models/view_pooler/view_sampler.py +++ b/pytorch3d/implicitron/models/view_pooler/view_sampler.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Dict, List, Optional, Tuple, Union import torch diff --git a/pytorch3d/implicitron/models/visualization/__init__.py b/pytorch3d/implicitron/models/visualization/__init__.py index a9fdb3b9..6267ddbf 100644 --- a/pytorch3d/implicitron/models/visualization/__init__.py +++ b/pytorch3d/implicitron/models/visualization/__init__.py @@ -4,3 +4,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/pytorch3d/implicitron/models/visualization/render_flyaround.py b/pytorch3d/implicitron/models/visualization/render_flyaround.py index 2a3afadb..44ca3de5 100644 --- a/pytorch3d/implicitron/models/visualization/render_flyaround.py +++ b/pytorch3d/implicitron/models/visualization/render_flyaround.py @@ -5,6 +5,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging import math diff --git a/pytorch3d/implicitron/third_party/__init__.py b/pytorch3d/implicitron/third_party/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/pytorch3d/implicitron/third_party/__init__.py +++ b/pytorch3d/implicitron/third_party/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/pytorch3d/implicitron/third_party/hyperlayers.py b/pytorch3d/implicitron/third_party/hyperlayers.py index e5623513..8ad9ebeb 100644 --- a/pytorch3d/implicitron/third_party/hyperlayers.py +++ b/pytorch3d/implicitron/third_party/hyperlayers.py @@ -1,6 +1,8 @@ # a copy-paste from https://github.com/vsitzmann/scene-representation-networks/blob/master/hyperlayers.py # fmt: off # flake8: noqa + +# pyre-unsafe '''Pytorch implementations of hyper-network modules. ''' import functools diff --git a/pytorch3d/implicitron/third_party/pytorch_prototyping.py b/pytorch3d/implicitron/third_party/pytorch_prototyping.py index 7dd973fc..6e2366d5 100644 --- a/pytorch3d/implicitron/third_party/pytorch_prototyping.py +++ b/pytorch3d/implicitron/third_party/pytorch_prototyping.py @@ -1,6 +1,8 @@ # a copy-paste from https://raw.githubusercontent.com/vsitzmann/pytorch_prototyping/10f49b1e7df38a58fd78451eac91d7ac1a21df64/pytorch_prototyping.py # fmt: off # flake8: noqa + +# pyre-unsafe '''A number of custom pytorch modules with sane defaults that I find useful for model prototyping. ''' import torch diff --git a/pytorch3d/implicitron/tools/__init__.py b/pytorch3d/implicitron/tools/__init__.py index 2e41cd71..6ac1a72b 100644 --- a/pytorch3d/implicitron/tools/__init__.py +++ b/pytorch3d/implicitron/tools/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. + +# pyre-unsafe diff --git a/pytorch3d/implicitron/tools/camera_utils.py b/pytorch3d/implicitron/tools/camera_utils.py index ecf6e9fa..0c76373d 100644 --- a/pytorch3d/implicitron/tools/camera_utils.py +++ b/pytorch3d/implicitron/tools/camera_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + # TODO: all this potentially goes to PyTorch3D diff --git a/pytorch3d/implicitron/tools/circle_fitting.py b/pytorch3d/implicitron/tools/circle_fitting.py index 2f502789..7f6cd1a0 100644 --- a/pytorch3d/implicitron/tools/circle_fitting.py +++ b/pytorch3d/implicitron/tools/circle_fitting.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings from dataclasses import dataclass from math import pi diff --git a/pytorch3d/implicitron/tools/config.py b/pytorch3d/implicitron/tools/config.py index b0459e82..4479fe65 100644 --- a/pytorch3d/implicitron/tools/config.py +++ b/pytorch3d/implicitron/tools/config.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import dataclasses import inspect import itertools diff --git a/pytorch3d/implicitron/tools/depth_cleanup.py b/pytorch3d/implicitron/tools/depth_cleanup.py index 9e5b509e..89d48d37 100644 --- a/pytorch3d/implicitron/tools/depth_cleanup.py +++ b/pytorch3d/implicitron/tools/depth_cleanup.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch import torch.nn.functional as Fu from pytorch3d.ops import wmean diff --git a/pytorch3d/implicitron/tools/eval_video_trajectory.py b/pytorch3d/implicitron/tools/eval_video_trajectory.py index 554b88a1..f46fe292 100644 --- a/pytorch3d/implicitron/tools/eval_video_trajectory.py +++ b/pytorch3d/implicitron/tools/eval_video_trajectory.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging import math from typing import Optional, Tuple diff --git a/pytorch3d/implicitron/tools/image_utils.py b/pytorch3d/implicitron/tools/image_utils.py index 29c7e0a4..7e8b3b04 100644 --- a/pytorch3d/implicitron/tools/image_utils.py +++ b/pytorch3d/implicitron/tools/image_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Sequence, Union diff --git a/pytorch3d/implicitron/tools/metric_utils.py b/pytorch3d/implicitron/tools/metric_utils.py index 2ed2a8e3..d4debeef 100644 --- a/pytorch3d/implicitron/tools/metric_utils.py +++ b/pytorch3d/implicitron/tools/metric_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import math from typing import Optional, Tuple diff --git a/pytorch3d/implicitron/tools/model_io.py b/pytorch3d/implicitron/tools/model_io.py index f94a4ed2..c6bc499d 100644 --- a/pytorch3d/implicitron/tools/model_io.py +++ b/pytorch3d/implicitron/tools/model_io.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import glob import logging import os diff --git a/pytorch3d/implicitron/tools/point_cloud_utils.py b/pytorch3d/implicitron/tools/point_cloud_utils.py index 5954aace..feee053e 100644 --- a/pytorch3d/implicitron/tools/point_cloud_utils.py +++ b/pytorch3d/implicitron/tools/point_cloud_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import cast, Optional, Tuple diff --git a/pytorch3d/implicitron/tools/rasterize_mc.py b/pytorch3d/implicitron/tools/rasterize_mc.py index 3fbf4b8d..9615987e 100644 --- a/pytorch3d/implicitron/tools/rasterize_mc.py +++ b/pytorch3d/implicitron/tools/rasterize_mc.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import math from typing import Optional, Tuple diff --git a/pytorch3d/implicitron/tools/stats.py b/pytorch3d/implicitron/tools/stats.py index c49ba424..0625f3e3 100644 --- a/pytorch3d/implicitron/tools/stats.py +++ b/pytorch3d/implicitron/tools/stats.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import gzip import json import logging diff --git a/pytorch3d/implicitron/tools/utils.py b/pytorch3d/implicitron/tools/utils.py index 895a8727..b556d1eb 100644 --- a/pytorch3d/implicitron/tools/utils.py +++ b/pytorch3d/implicitron/tools/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import collections import dataclasses diff --git a/pytorch3d/implicitron/tools/video_writer.py b/pytorch3d/implicitron/tools/video_writer.py index 3db55e88..86764071 100644 --- a/pytorch3d/implicitron/tools/video_writer.py +++ b/pytorch3d/implicitron/tools/video_writer.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import os import shutil import subprocess diff --git a/pytorch3d/implicitron/tools/vis_utils.py b/pytorch3d/implicitron/tools/vis_utils.py index 1b3b1f15..662c138c 100644 --- a/pytorch3d/implicitron/tools/vis_utils.py +++ b/pytorch3d/implicitron/tools/vis_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging from typing import Any, Dict, Optional, Tuple, TYPE_CHECKING diff --git a/pytorch3d/io/__init__.py b/pytorch3d/io/__init__.py index c28b5df1..8764c601 100644 --- a/pytorch3d/io/__init__.py +++ b/pytorch3d/io/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .obj_io import load_obj, load_objs_as_meshes, save_obj from .pluggable import IO diff --git a/pytorch3d/io/experimental_gltf_io.py b/pytorch3d/io/experimental_gltf_io.py index 10905227..937147ce 100644 --- a/pytorch3d/io/experimental_gltf_io.py +++ b/pytorch3d/io/experimental_gltf_io.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """ This module implements loading meshes from glTF 2 assets stored in a diff --git a/pytorch3d/io/mtl_io.py b/pytorch3d/io/mtl_io.py index 166f98a8..bbe25c0f 100644 --- a/pytorch3d/io/mtl_io.py +++ b/pytorch3d/io/mtl_io.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """This module implements utility functions for loading .mtl files and textures.""" import os import warnings diff --git a/pytorch3d/io/obj_io.py b/pytorch3d/io/obj_io.py index 834c51ed..156e0830 100644 --- a/pytorch3d/io/obj_io.py +++ b/pytorch3d/io/obj_io.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """This module implements utility functions for loading and saving meshes.""" import os diff --git a/pytorch3d/io/off_io.py b/pytorch3d/io/off_io.py index 4262269e..78b4390d 100644 --- a/pytorch3d/io/off_io.py +++ b/pytorch3d/io/off_io.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """ This module implements utility functions for loading and saving diff --git a/pytorch3d/io/pluggable.py b/pytorch3d/io/pluggable.py index 0c37859e..4e9951ac 100644 --- a/pytorch3d/io/pluggable.py +++ b/pytorch3d/io/pluggable.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from collections import deque from pathlib import Path diff --git a/pytorch3d/io/pluggable_formats.py b/pytorch3d/io/pluggable_formats.py index 8973b7c7..328a124d 100644 --- a/pytorch3d/io/pluggable_formats.py +++ b/pytorch3d/io/pluggable_formats.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import pathlib from typing import Optional, Tuple diff --git a/pytorch3d/io/ply_io.py b/pytorch3d/io/ply_io.py index 1d59b193..99207e6f 100644 --- a/pytorch3d/io/ply_io.py +++ b/pytorch3d/io/ply_io.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """ This module implements utility functions for loading and saving diff --git a/pytorch3d/io/utils.py b/pytorch3d/io/utils.py index ee437b3a..467c7c14 100644 --- a/pytorch3d/io/utils.py +++ b/pytorch3d/io/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import contextlib import pathlib import warnings diff --git a/pytorch3d/loss/__init__.py b/pytorch3d/loss/__init__.py index 2b8d10de..3a9e3932 100644 --- a/pytorch3d/loss/__init__.py +++ b/pytorch3d/loss/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .chamfer import chamfer_distance from .mesh_edge_loss import mesh_edge_loss diff --git a/pytorch3d/loss/chamfer.py b/pytorch3d/loss/chamfer.py index 3ef1d6f4..67289020 100644 --- a/pytorch3d/loss/chamfer.py +++ b/pytorch3d/loss/chamfer.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Union import torch diff --git a/pytorch3d/loss/mesh_edge_loss.py b/pytorch3d/loss/mesh_edge_loss.py index e54ddf9f..615fe507 100644 --- a/pytorch3d/loss/mesh_edge_loss.py +++ b/pytorch3d/loss/mesh_edge_loss.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch diff --git a/pytorch3d/loss/mesh_laplacian_smoothing.py b/pytorch3d/loss/mesh_laplacian_smoothing.py index 3ce9298a..02037841 100644 --- a/pytorch3d/loss/mesh_laplacian_smoothing.py +++ b/pytorch3d/loss/mesh_laplacian_smoothing.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch from pytorch3d.ops import cot_laplacian diff --git a/pytorch3d/loss/mesh_normal_consistency.py b/pytorch3d/loss/mesh_normal_consistency.py index a1dbf670..5466df30 100644 --- a/pytorch3d/loss/mesh_normal_consistency.py +++ b/pytorch3d/loss/mesh_normal_consistency.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch from pytorch3d import _C diff --git a/pytorch3d/loss/point_mesh_distance.py b/pytorch3d/loss/point_mesh_distance.py index fc45bc12..b30cd05e 100644 --- a/pytorch3d/loss/point_mesh_distance.py +++ b/pytorch3d/loss/point_mesh_distance.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from pytorch3d import _C from pytorch3d.structures import Meshes, Pointclouds from torch.autograd import Function diff --git a/pytorch3d/ops/__init__.py b/pytorch3d/ops/__init__.py index 9e561ccd..ae82efd1 100644 --- a/pytorch3d/ops/__init__.py +++ b/pytorch3d/ops/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .ball_query import ball_query from .cameras_alignment import corresponding_cameras_alignment from .cubify import cubify diff --git a/pytorch3d/ops/ball_query.py b/pytorch3d/ops/ball_query.py index af271a40..31266c4d 100644 --- a/pytorch3d/ops/ball_query.py +++ b/pytorch3d/ops/ball_query.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Union import torch diff --git a/pytorch3d/ops/cameras_alignment.py b/pytorch3d/ops/cameras_alignment.py index 12412c67..40e00aba 100644 --- a/pytorch3d/ops/cameras_alignment.py +++ b/pytorch3d/ops/cameras_alignment.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import TYPE_CHECKING import torch diff --git a/pytorch3d/ops/cubify.py b/pytorch3d/ops/cubify.py index 364e6226..ceab4bc7 100644 --- a/pytorch3d/ops/cubify.py +++ b/pytorch3d/ops/cubify.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Optional diff --git a/pytorch3d/ops/graph_conv.py b/pytorch3d/ops/graph_conv.py index 1d7a6186..a43eeb3a 100644 --- a/pytorch3d/ops/graph_conv.py +++ b/pytorch3d/ops/graph_conv.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch import torch.nn as nn diff --git a/pytorch3d/ops/interp_face_attrs.py b/pytorch3d/ops/interp_face_attrs.py index 705fc152..c1f04891 100644 --- a/pytorch3d/ops/interp_face_attrs.py +++ b/pytorch3d/ops/interp_face_attrs.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch from pytorch3d import _C from torch.autograd import Function diff --git a/pytorch3d/ops/iou_box3d.py b/pytorch3d/ops/iou_box3d.py index dbc6358b..3c01bd65 100644 --- a/pytorch3d/ops/iou_box3d.py +++ b/pytorch3d/ops/iou_box3d.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Tuple import torch diff --git a/pytorch3d/ops/knn.py b/pytorch3d/ops/knn.py index 2b31c5cb..114334fd 100644 --- a/pytorch3d/ops/knn.py +++ b/pytorch3d/ops/knn.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from collections import namedtuple from typing import Union diff --git a/pytorch3d/ops/laplacian_matrices.py b/pytorch3d/ops/laplacian_matrices.py index 542fbebf..6400923f 100644 --- a/pytorch3d/ops/laplacian_matrices.py +++ b/pytorch3d/ops/laplacian_matrices.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Tuple import torch diff --git a/pytorch3d/ops/marching_cubes.py b/pytorch3d/ops/marching_cubes.py index 8ae3d16e..17236857 100644 --- a/pytorch3d/ops/marching_cubes.py +++ b/pytorch3d/ops/marching_cubes.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import List, Optional, Tuple import torch diff --git a/pytorch3d/ops/marching_cubes_data.py b/pytorch3d/ops/marching_cubes_data.py index 802f67da..802377e0 100644 --- a/pytorch3d/ops/marching_cubes_data.py +++ b/pytorch3d/ops/marching_cubes_data.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + # Maps each edge (by index) to the corresponding cube vertices EDGE_TO_VERTICES = [ diff --git a/pytorch3d/ops/mesh_face_areas_normals.py b/pytorch3d/ops/mesh_face_areas_normals.py index f41ff1dc..ea91f482 100644 --- a/pytorch3d/ops/mesh_face_areas_normals.py +++ b/pytorch3d/ops/mesh_face_areas_normals.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch from pytorch3d import _C from torch.autograd import Function diff --git a/pytorch3d/ops/mesh_filtering.py b/pytorch3d/ops/mesh_filtering.py index 90cf1211..d8f29431 100644 --- a/pytorch3d/ops/mesh_filtering.py +++ b/pytorch3d/ops/mesh_filtering.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch from pytorch3d.ops import norm_laplacian from pytorch3d.structures import Meshes, utils as struct_utils diff --git a/pytorch3d/ops/packed_to_padded.py b/pytorch3d/ops/packed_to_padded.py index 5072e624..fd40bcc4 100644 --- a/pytorch3d/ops/packed_to_padded.py +++ b/pytorch3d/ops/packed_to_padded.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch from pytorch3d import _C from torch.autograd import Function diff --git a/pytorch3d/ops/perspective_n_points.py b/pytorch3d/ops/perspective_n_points.py index c6b7d681..db5e0057 100644 --- a/pytorch3d/ops/perspective_n_points.py +++ b/pytorch3d/ops/perspective_n_points.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """ This file contains Efficient PnP algorithm for Perspective-n-Points problem. It finds a camera position (defined by rotation `R` and translation `T`) that diff --git a/pytorch3d/ops/points_alignment.py b/pytorch3d/ops/points_alignment.py index 1b22b3cc..96e4b410 100644 --- a/pytorch3d/ops/points_alignment.py +++ b/pytorch3d/ops/points_alignment.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings from typing import List, NamedTuple, Optional, TYPE_CHECKING, Union diff --git a/pytorch3d/ops/points_normals.py b/pytorch3d/ops/points_normals.py index 63aeefbd..f4d3b27c 100644 --- a/pytorch3d/ops/points_normals.py +++ b/pytorch3d/ops/points_normals.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Tuple, TYPE_CHECKING, Union import torch diff --git a/pytorch3d/ops/points_to_volumes.py b/pytorch3d/ops/points_to_volumes.py index f319d90a..9e051ae3 100644 --- a/pytorch3d/ops/points_to_volumes.py +++ b/pytorch3d/ops/points_to_volumes.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Optional, Tuple, TYPE_CHECKING import torch diff --git a/pytorch3d/ops/sample_farthest_points.py b/pytorch3d/ops/sample_farthest_points.py index a2779e42..a45b1de2 100644 --- a/pytorch3d/ops/sample_farthest_points.py +++ b/pytorch3d/ops/sample_farthest_points.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from random import randint from typing import List, Optional, Tuple, Union diff --git a/pytorch3d/ops/sample_points_from_meshes.py b/pytorch3d/ops/sample_points_from_meshes.py index 2e2d3489..95c530bf 100644 --- a/pytorch3d/ops/sample_points_from_meshes.py +++ b/pytorch3d/ops/sample_points_from_meshes.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """ This module implements utility functions for sampling points from diff --git a/pytorch3d/ops/subdivide_meshes.py b/pytorch3d/ops/subdivide_meshes.py index 9a633ae2..86204309 100644 --- a/pytorch3d/ops/subdivide_meshes.py +++ b/pytorch3d/ops/subdivide_meshes.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch import torch.nn as nn diff --git a/pytorch3d/ops/utils.py b/pytorch3d/ops/utils.py index cb576d5b..d2f68294 100644 --- a/pytorch3d/ops/utils.py +++ b/pytorch3d/ops/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Optional, Tuple, TYPE_CHECKING, Union import torch diff --git a/pytorch3d/ops/vert_align.py b/pytorch3d/ops/vert_align.py index f8181aeb..fd1a90d0 100644 --- a/pytorch3d/ops/vert_align.py +++ b/pytorch3d/ops/vert_align.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch import torch.nn.functional as F diff --git a/pytorch3d/renderer/__init__.py b/pytorch3d/renderer/__init__.py index a667b012..affe30d6 100644 --- a/pytorch3d/renderer/__init__.py +++ b/pytorch3d/renderer/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .blending import ( BlendParams, hard_rgb_blend, diff --git a/pytorch3d/renderer/blending.py b/pytorch3d/renderer/blending.py index 07c92437..5673c54b 100644 --- a/pytorch3d/renderer/blending.py +++ b/pytorch3d/renderer/blending.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import NamedTuple, Sequence, Union import torch diff --git a/pytorch3d/renderer/camera_conversions.py b/pytorch3d/renderer/camera_conversions.py index 7617513d..d18707a3 100644 --- a/pytorch3d/renderer/camera_conversions.py +++ b/pytorch3d/renderer/camera_conversions.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import logging from typing import Tuple diff --git a/pytorch3d/renderer/camera_utils.py b/pytorch3d/renderer/camera_utils.py index 1bddcaf2..e5656315 100644 --- a/pytorch3d/renderer/camera_utils.py +++ b/pytorch3d/renderer/camera_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Sequence, Tuple import torch diff --git a/pytorch3d/renderer/cameras.py b/pytorch3d/renderer/cameras.py index 97c1dfd8..d3d4ff24 100644 --- a/pytorch3d/renderer/cameras.py +++ b/pytorch3d/renderer/cameras.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import math import warnings from typing import Any, Dict, List, Optional, Sequence, Tuple, Union diff --git a/pytorch3d/renderer/compositing.py b/pytorch3d/renderer/compositing.py index 669108e6..507f3f90 100644 --- a/pytorch3d/renderer/compositing.py +++ b/pytorch3d/renderer/compositing.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch from pytorch3d import _C diff --git a/pytorch3d/renderer/fisheyecameras.py b/pytorch3d/renderer/fisheyecameras.py index fe4bcef3..5b464a0b 100644 --- a/pytorch3d/renderer/fisheyecameras.py +++ b/pytorch3d/renderer/fisheyecameras.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import math from typing import List, Optional, Tuple, Union diff --git a/pytorch3d/renderer/implicit/__init__.py b/pytorch3d/renderer/implicit/__init__.py index 39090112..d13affae 100644 --- a/pytorch3d/renderer/implicit/__init__.py +++ b/pytorch3d/renderer/implicit/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .harmonic_embedding import HarmonicEmbedding from .raymarching import AbsorptionOnlyRaymarcher, EmissionAbsorptionRaymarcher from .raysampling import ( diff --git a/pytorch3d/renderer/implicit/harmonic_embedding.py b/pytorch3d/renderer/implicit/harmonic_embedding.py index 90e857f8..c3b1e944 100644 --- a/pytorch3d/renderer/implicit/harmonic_embedding.py +++ b/pytorch3d/renderer/implicit/harmonic_embedding.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Optional import torch diff --git a/pytorch3d/renderer/implicit/raymarching.py b/pytorch3d/renderer/implicit/raymarching.py index 047229b2..60eae7b7 100644 --- a/pytorch3d/renderer/implicit/raymarching.py +++ b/pytorch3d/renderer/implicit/raymarching.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings from typing import Optional, Tuple, Union diff --git a/pytorch3d/renderer/implicit/raysampling.py b/pytorch3d/renderer/implicit/raysampling.py index c81178af..09decba8 100644 --- a/pytorch3d/renderer/implicit/raysampling.py +++ b/pytorch3d/renderer/implicit/raysampling.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings from typing import Optional, Tuple, Union diff --git a/pytorch3d/renderer/implicit/renderer.py b/pytorch3d/renderer/implicit/renderer.py index ffd7578e..963f7d07 100644 --- a/pytorch3d/renderer/implicit/renderer.py +++ b/pytorch3d/renderer/implicit/renderer.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Callable, Tuple, Union import torch diff --git a/pytorch3d/renderer/implicit/sample_pdf.py b/pytorch3d/renderer/implicit/sample_pdf.py index c2387e5b..7009867d 100644 --- a/pytorch3d/renderer/implicit/sample_pdf.py +++ b/pytorch3d/renderer/implicit/sample_pdf.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch from pytorch3d import _C diff --git a/pytorch3d/renderer/implicit/utils.py b/pytorch3d/renderer/implicit/utils.py index d73c8583..bd6bcc31 100644 --- a/pytorch3d/renderer/implicit/utils.py +++ b/pytorch3d/renderer/implicit/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import dataclasses from typing import NamedTuple, Optional, Union diff --git a/pytorch3d/renderer/lighting.py b/pytorch3d/renderer/lighting.py index ab4f5fd3..4394c3e5 100644 --- a/pytorch3d/renderer/lighting.py +++ b/pytorch3d/renderer/lighting.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch import torch.nn.functional as F diff --git a/pytorch3d/renderer/materials.py b/pytorch3d/renderer/materials.py index 27558ed8..be85b8ab 100644 --- a/pytorch3d/renderer/materials.py +++ b/pytorch3d/renderer/materials.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch diff --git a/pytorch3d/renderer/mesh/__init__.py b/pytorch3d/renderer/mesh/__init__.py index f6bda3f7..8dcab52b 100644 --- a/pytorch3d/renderer/mesh/__init__.py +++ b/pytorch3d/renderer/mesh/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .clip import ( clip_faces, ClipFrustum, diff --git a/pytorch3d/renderer/mesh/clip.py b/pytorch3d/renderer/mesh/clip.py index eca5c94e..b8e8ae97 100644 --- a/pytorch3d/renderer/mesh/clip.py +++ b/pytorch3d/renderer/mesh/clip.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Any, List, Optional, Tuple import torch diff --git a/pytorch3d/renderer/mesh/rasterize_meshes.py b/pytorch3d/renderer/mesh/rasterize_meshes.py index 878519e4..473efb85 100644 --- a/pytorch3d/renderer/mesh/rasterize_meshes.py +++ b/pytorch3d/renderer/mesh/rasterize_meshes.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import List, Optional, Tuple, Union diff --git a/pytorch3d/renderer/mesh/rasterizer.py b/pytorch3d/renderer/mesh/rasterizer.py index 5ef27603..0e5c9f4d 100644 --- a/pytorch3d/renderer/mesh/rasterizer.py +++ b/pytorch3d/renderer/mesh/rasterizer.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from dataclasses import dataclass from typing import Optional, Tuple, Union diff --git a/pytorch3d/renderer/mesh/renderer.py b/pytorch3d/renderer/mesh/renderer.py index 98576a9f..5b623243 100644 --- a/pytorch3d/renderer/mesh/renderer.py +++ b/pytorch3d/renderer/mesh/renderer.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Tuple import torch diff --git a/pytorch3d/renderer/mesh/shader.py b/pytorch3d/renderer/mesh/shader.py index 40e9cd17..77aeba91 100644 --- a/pytorch3d/renderer/mesh/shader.py +++ b/pytorch3d/renderer/mesh/shader.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings from typing import Optional diff --git a/pytorch3d/renderer/mesh/shading.py b/pytorch3d/renderer/mesh/shading.py index 05cb66ad..bb113ee1 100644 --- a/pytorch3d/renderer/mesh/shading.py +++ b/pytorch3d/renderer/mesh/shading.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Tuple diff --git a/pytorch3d/renderer/mesh/textures.py b/pytorch3d/renderer/mesh/textures.py index 59927155..ed662152 100644 --- a/pytorch3d/renderer/mesh/textures.py +++ b/pytorch3d/renderer/mesh/textures.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import itertools import warnings from typing import Dict, List, Optional, Tuple, TYPE_CHECKING, Union diff --git a/pytorch3d/renderer/mesh/utils.py b/pytorch3d/renderer/mesh/utils.py index 6157c870..73b91c49 100644 --- a/pytorch3d/renderer/mesh/utils.py +++ b/pytorch3d/renderer/mesh/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import List, NamedTuple, Tuple import torch diff --git a/pytorch3d/renderer/opengl/__init__.py b/pytorch3d/renderer/opengl/__init__.py index 6e363be3..388a3009 100644 --- a/pytorch3d/renderer/opengl/__init__.py +++ b/pytorch3d/renderer/opengl/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + # If we can access EGL, import MeshRasterizerOpenGL. def _can_import_egl_and_pycuda(): diff --git a/pytorch3d/renderer/opengl/opengl_utils.py b/pytorch3d/renderer/opengl/opengl_utils.py index b854f067..8201b307 100755 --- a/pytorch3d/renderer/opengl/opengl_utils.py +++ b/pytorch3d/renderer/opengl/opengl_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + # Utilities useful for OpenGL rendering. # # NOTE: This module MUST be imported before any other OpenGL modules in this Python diff --git a/pytorch3d/renderer/opengl/rasterizer_opengl.py b/pytorch3d/renderer/opengl/rasterizer_opengl.py index c7b0073f..9c8c1e8f 100644 --- a/pytorch3d/renderer/opengl/rasterizer_opengl.py +++ b/pytorch3d/renderer/opengl/rasterizer_opengl.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + # NOTE: This module (as well as rasterizer_opengl) will not be imported into pytorch3d # if you do not have pycuda.gl and pyopengl installed. In addition, please make sure # your Python application *does not* import OpenGL before importing PyTorch3D, unless diff --git a/pytorch3d/renderer/points/__init__.py b/pytorch3d/renderer/points/__init__.py index 2fde33ba..452740d8 100644 --- a/pytorch3d/renderer/points/__init__.py +++ b/pytorch3d/renderer/points/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .compositor import AlphaCompositor, NormWeightedCompositor from .pulsar.unified import PulsarPointsRenderer from .rasterize_points import rasterize_points diff --git a/pytorch3d/renderer/points/compositor.py b/pytorch3d/renderer/points/compositor.py index 0846e53e..14187eee 100644 --- a/pytorch3d/renderer/points/compositor.py +++ b/pytorch3d/renderer/points/compositor.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import List, Optional, Tuple, Union import torch diff --git a/pytorch3d/renderer/points/pulsar/__init__.py b/pytorch3d/renderer/points/pulsar/__init__.py index 22fe5de6..c843025a 100644 --- a/pytorch3d/renderer/points/pulsar/__init__.py +++ b/pytorch3d/renderer/points/pulsar/__init__.py @@ -4,4 +4,6 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .renderer import Renderer # noqa: F401 diff --git a/pytorch3d/renderer/points/pulsar/renderer.py b/pytorch3d/renderer/points/pulsar/renderer.py index 9ba7dfd5..5aceda6f 100644 --- a/pytorch3d/renderer/points/pulsar/renderer.py +++ b/pytorch3d/renderer/points/pulsar/renderer.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + """pulsar renderer PyTorch integration. Proper Python support for pytorch requires creating a torch.autograd.function diff --git a/pytorch3d/renderer/points/pulsar/unified.py b/pytorch3d/renderer/points/pulsar/unified.py index 146bbb8f..13664d4d 100644 --- a/pytorch3d/renderer/points/pulsar/unified.py +++ b/pytorch3d/renderer/points/pulsar/unified.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import math import warnings from typing import Any, Dict, Optional, Tuple, Union diff --git a/pytorch3d/renderer/points/rasterize_points.py b/pytorch3d/renderer/points/rasterize_points.py index 08211049..19c9096e 100644 --- a/pytorch3d/renderer/points/rasterize_points.py +++ b/pytorch3d/renderer/points/rasterize_points.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import List, Optional, Tuple, Union import numpy as np diff --git a/pytorch3d/renderer/points/rasterizer.py b/pytorch3d/renderer/points/rasterizer.py index 5831994c..8c141b90 100644 --- a/pytorch3d/renderer/points/rasterizer.py +++ b/pytorch3d/renderer/points/rasterizer.py @@ -5,6 +5,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from dataclasses import dataclass from typing import NamedTuple, Optional, Tuple, Union diff --git a/pytorch3d/renderer/points/renderer.py b/pytorch3d/renderer/points/renderer.py index 0a83ec40..4ce53605 100644 --- a/pytorch3d/renderer/points/renderer.py +++ b/pytorch3d/renderer/points/renderer.py @@ -5,6 +5,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch import torch.nn as nn diff --git a/pytorch3d/renderer/splatter_blend.py b/pytorch3d/renderer/splatter_blend.py index 0149dfb3..e753d29a 100644 --- a/pytorch3d/renderer/splatter_blend.py +++ b/pytorch3d/renderer/splatter_blend.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + # This file defines SplatterBlender, which is used for blending in SplatterPhongShader. import itertools diff --git a/pytorch3d/renderer/utils.py b/pytorch3d/renderer/utils.py index e2c37871..e389b4d8 100644 --- a/pytorch3d/renderer/utils.py +++ b/pytorch3d/renderer/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import copy import inspect diff --git a/pytorch3d/structures/__init__.py b/pytorch3d/structures/__init__.py index b92e8724..7ed0194a 100644 --- a/pytorch3d/structures/__init__.py +++ b/pytorch3d/structures/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .meshes import join_meshes_as_batch, join_meshes_as_scene, Meshes from .pointclouds import ( join_pointclouds_as_batch, diff --git a/pytorch3d/structures/meshes.py b/pytorch3d/structures/meshes.py index fce929be..53f3f454 100644 --- a/pytorch3d/structures/meshes.py +++ b/pytorch3d/structures/meshes.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import List, Union import torch diff --git a/pytorch3d/structures/pointclouds.py b/pytorch3d/structures/pointclouds.py index 654b5a26..f699881c 100644 --- a/pytorch3d/structures/pointclouds.py +++ b/pytorch3d/structures/pointclouds.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from itertools import zip_longest from typing import List, Optional, Sequence, Tuple, Union diff --git a/pytorch3d/structures/utils.py b/pytorch3d/structures/utils.py index aab4fc3d..c6b75d93 100644 --- a/pytorch3d/structures/utils.py +++ b/pytorch3d/structures/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import List, Sequence, Tuple, Union import torch diff --git a/pytorch3d/structures/volumes.py b/pytorch3d/structures/volumes.py index 23ed743d..8bf069b5 100644 --- a/pytorch3d/structures/volumes.py +++ b/pytorch3d/structures/volumes.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import copy from typing import List, Optional, Tuple, Union diff --git a/pytorch3d/transforms/__init__.py b/pytorch3d/transforms/__init__.py index 9d8ee713..96b24156 100644 --- a/pytorch3d/transforms/__init__.py +++ b/pytorch3d/transforms/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .math import acos_linear_extrapolation from .rotation_conversions import ( axis_angle_to_matrix, diff --git a/pytorch3d/transforms/math.py b/pytorch3d/transforms/math.py index e2b93c93..5008bd58 100644 --- a/pytorch3d/transforms/math.py +++ b/pytorch3d/transforms/math.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import math from typing import Tuple diff --git a/pytorch3d/transforms/rotation_conversions.py b/pytorch3d/transforms/rotation_conversions.py index 459441ca..0164e413 100644 --- a/pytorch3d/transforms/rotation_conversions.py +++ b/pytorch3d/transforms/rotation_conversions.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Optional import torch diff --git a/pytorch3d/transforms/se3.py b/pytorch3d/transforms/se3.py index 1c8a5a1b..693b84c2 100644 --- a/pytorch3d/transforms/se3.py +++ b/pytorch3d/transforms/se3.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch from .so3 import _so3_exp_map, hat, so3_log_map diff --git a/pytorch3d/transforms/so3.py b/pytorch3d/transforms/so3.py index dea68a90..169e1df0 100644 --- a/pytorch3d/transforms/so3.py +++ b/pytorch3d/transforms/so3.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings from typing import Tuple diff --git a/pytorch3d/transforms/transform3d.py b/pytorch3d/transforms/transform3d.py index cbef7cbb..b2ee2593 100644 --- a/pytorch3d/transforms/transform3d.py +++ b/pytorch3d/transforms/transform3d.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import math import os import warnings diff --git a/pytorch3d/utils/__init__.py b/pytorch3d/utils/__init__.py index f3681e82..b65c55ea 100644 --- a/pytorch3d/utils/__init__.py +++ b/pytorch3d/utils/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from .camera_conversions import ( cameras_from_opencv_projection, opencv_from_cameras_projection, diff --git a/pytorch3d/utils/camera_conversions.py b/pytorch3d/utils/camera_conversions.py index 83ce2bb5..b9fa43be 100644 --- a/pytorch3d/utils/camera_conversions.py +++ b/pytorch3d/utils/camera_conversions.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Tuple import torch diff --git a/pytorch3d/utils/checkerboard.py b/pytorch3d/utils/checkerboard.py index 625c0868..a0d53fd9 100644 --- a/pytorch3d/utils/checkerboard.py +++ b/pytorch3d/utils/checkerboard.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Optional, Tuple diff --git a/pytorch3d/utils/ico_sphere.py b/pytorch3d/utils/ico_sphere.py index da7ed10b..bc7ca24f 100644 --- a/pytorch3d/utils/ico_sphere.py +++ b/pytorch3d/utils/ico_sphere.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import torch from pytorch3d.ops.subdivide_meshes import SubdivideMeshes diff --git a/pytorch3d/utils/torus.py b/pytorch3d/utils/torus.py index c5c34785..853cd895 100644 --- a/pytorch3d/utils/torus.py +++ b/pytorch3d/utils/torus.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from itertools import tee from math import cos, pi, sin from typing import Iterator, Optional, Tuple diff --git a/pytorch3d/vis/__init__.py b/pytorch3d/vis/__init__.py index 972cc5ce..eb0266b9 100644 --- a/pytorch3d/vis/__init__.py +++ b/pytorch3d/vis/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings diff --git a/pytorch3d/vis/plotly_vis.py b/pytorch3d/vis/plotly_vis.py index 155e143d..8b5a8f48 100644 --- a/pytorch3d/vis/plotly_vis.py +++ b/pytorch3d/vis/plotly_vis.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + import warnings from typing import Dict, List, NamedTuple, Optional, Tuple, Union diff --git a/pytorch3d/vis/texture_vis.py b/pytorch3d/vis/texture_vis.py index 0d36abb6..60b0d1b4 100644 --- a/pytorch3d/vis/texture_vis.py +++ b/pytorch3d/vis/texture_vis.py @@ -4,6 +4,8 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. +# pyre-unsafe + from typing import Any, Optional import numpy as np