Skip to content

Commit 6d36c1e

Browse files
Pyre Bot Jrfacebook-github-bot
Pyre Bot Jr
authored andcommitted
suppress errors in vision/fair/pytorch3d
Differential Revision: D31496551 fbshipit-source-id: 705fd88f319875db3f7938a2946c48a51ea225f5
1 parent 6dfa326 commit 6d36c1e

File tree

10 files changed

+3
-12
lines changed

10 files changed

+3
-12
lines changed

pytorch3d/ops/marching_cubes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ def marching_cubes_naive(
117117
volume_data_batch = volume_data_batch.detach().cpu()
118118
batched_verts, batched_faces = [], []
119119
D, H, W = volume_data_batch.shape[1:]
120-
# pyre-ignore [16]
121120
volume_size_xyz = volume_data_batch.new_tensor([W, H, D])[None]
122121

123122
if return_local_coords:

pytorch3d/ops/points_to_volumes.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ def _add_points_features_to_volume_densities_features_python(
435435

436436
if volume_features is None:
437437
# initialize features if not passed in
438-
# pyre-fixme[16]: `Tensor` has no attribute `new_zeros`.
439438
volume_features_flatten = volume_densities.new_zeros(ba, feature_dim, n_voxels)
440439
else:
441440
# otherwise just flatten
@@ -478,7 +477,6 @@ def _check_points_to_volumes_inputs(
478477
mask: Optional[torch.Tensor] = None,
479478
):
480479

481-
# pyre-fixme[16]: `Tuple` has no attribute `values`.
482480
max_grid_size = grid_sizes.max(dim=0).values
483481
if torch.prod(max_grid_size) > volume_densities.shape[1]:
484482
raise ValueError(

pytorch3d/ops/sample_farthest_points.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ def sample_farthest_points_naive(
134134
# Initialize closest distances to inf, shape: (P,)
135135
# This will be updated at each iteration to track the closest distance of the
136136
# remaining points to any of the selected points
137-
# pyre-fixme[16]: `torch.Tensor` has no attribute new_full.
138137
closest_dists = points.new_full(
139138
(lengths[n],), float("inf"), dtype=torch.float32
140139
)

pytorch3d/renderer/blending.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def hard_rgb_blend(
6767
if isinstance(background_color_, torch.Tensor):
6868
background_color = background_color_.to(device)
6969
else:
70-
background_color = colors.new_tensor(background_color_) # pyre-fixme[16]
70+
background_color = colors.new_tensor(background_color_)
7171

7272
# Find out how much background_color needs to be expanded to be used for masked_scatter.
7373
num_background_pixels = is_background.sum()
@@ -217,7 +217,6 @@ def softmax_rgb_blend(
217217
znear = znear[:, None, None, None]
218218

219219
z_inv = (zfar - fragments.zbuf) / (zfar - znear) * mask
220-
# pyre-fixme[16]: `Tuple` has no attribute `values`.
221220
z_inv_max = torch.max(z_inv, dim=-1).values[..., None].clamp(min=eps)
222221
weights_num = prob_map * torch.exp((z_inv - z_inv_max) / blend_params.gamma)
223222

pytorch3d/renderer/implicit/raysampling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def _xy_to_ray_bundle(
298298
.reshape(batch_size, n_rays_per_image * 2, 2),
299299
torch.cat(
300300
(
301-
xy_grid.new_ones(batch_size, n_rays_per_image, 1), # pyre-ignore
301+
xy_grid.new_ones(batch_size, n_rays_per_image, 1),
302302
2.0 * xy_grid.new_ones(batch_size, n_rays_per_image, 1),
303303
),
304304
dim=1,

pytorch3d/renderer/mesh/rasterize_meshes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ def rasterize_meshes_python( # noqa: C901
475475
)
476476

477477
# Calculate all face bounding boxes.
478-
# pyre-fixme[16]: `Tuple` has no attribute `values`.
479478
x_mins = torch.min(faces_verts[:, :, 0], dim=1, keepdim=True).values
480479
x_maxs = torch.max(faces_verts[:, :, 0], dim=1, keepdim=True).values
481480
y_mins = torch.min(faces_verts[:, :, 1], dim=1, keepdim=True).values

pytorch3d/renderer/mesh/textures.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,6 @@ def join_scene(self) -> "TexturesUV":
11341134
)
11351135
merging_plan = pack_unique_rectangles(heights_and_widths)
11361136
C = maps[0].shape[-1]
1137-
# pyre-fixme[16]: `Tensor` has no attribute `new_zeros`.
11381137
single_map = maps[0].new_zeros((*merging_plan.total_size, C))
11391138
verts_uvs = self.verts_uvs_list()
11401139
verts_uvs_merged = []

pytorch3d/structures/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def list_to_padded(
5252

5353
# replace empty 1D tensors with empty tensors with a correct number of dimensions
5454
x = [
55-
# pyre-fixme[16]: `Tensor` has no attribute `new_zeros`.
5655
(y.new_zeros([0] * element_ndim) if (y.ndim == 1 and y.nelement() == 0) else y)
5756
for y in x
5857
]

pytorch3d/transforms/rotation_conversions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ def matrix_to_quaternion(matrix: torch.Tensor) -> torch.Tensor:
142142

143143
# We floor here at 0.1 but the exact level is not important; if q_abs is small,
144144
# the candidate won't be picked.
145-
# pyre-ignore [16]: `torch.Tensor` has no attribute `new_tensor`.
146145
quat_candidates = quat_by_rijk / (2.0 * q_abs[..., None].max(q_abs.new_tensor(0.1)))
147146

148147
# if not for numerical problems, quat_candidates[i] should be same (up to a sign),

pytorch3d/vis/plotly_vis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ def _add_ray_bundle_trace(
791791
# make ray line endpoints
792792
min_max_ray_depth = torch.stack(
793793
[
794-
ray_bundle_flat.lengths.min(dim=1).values, # pyre-ignore[16]
794+
ray_bundle_flat.lengths.min(dim=1).values,
795795
ray_bundle_flat.lengths.max(dim=1).values,
796796
],
797797
dim=-1,

0 commit comments

Comments
 (0)