test fixes and lints

Summary:
- followup recent pyre change D63415925
- make tests remove temporary files
- weights_only=True in torch.load
- lint fixes

3 test fixes from VRehnberg in https://github.com/facebookresearch/pytorch3d/issues/1914
- imageio channels fix
- frozen decorator in test_config
- load_blobs positional

Reviewed By: MichaelRamamonjisoa

Differential Revision: D66162167

fbshipit-source-id: 7737e174691b62f1708443a4fae07343cec5bfeb
This commit is contained in:
Jeremy Reizenstein
2024-11-20 09:15:51 -08:00
committed by Facebook GitHub Bot
parent c17e6f947a
commit e20cbe9b0e
21 changed files with 48 additions and 45 deletions

View File

@@ -196,7 +196,7 @@ class TestPointsToVolumes(TestCaseMixin, unittest.TestCase):
Generate a batch of `batch_size` cube meshes.
"""
device = torch.device(device)
device_ = torch.device(device)
verts, faces = [], []
@@ -213,7 +213,7 @@ class TestPointsToVolumes(TestCaseMixin, unittest.TestCase):
[0.0, 0.0, 1.0],
],
dtype=torch.float32,
device=device,
device=device_,
)
verts.append(v)
faces.append(
@@ -233,7 +233,7 @@ class TestPointsToVolumes(TestCaseMixin, unittest.TestCase):
[0, 1, 6],
],
dtype=torch.int64,
device=device,
device=device_,
)
)
@@ -316,7 +316,7 @@ class TestPointsToVolumes(TestCaseMixin, unittest.TestCase):
outfile = (
outdir
+ f"/rgb_{interp_mode}"
+ f"_{str(volume_size).replace(' ','')}"
+ f"_{str(volume_size).replace(' ', '')}"
+ f"_{vidx:003d}_sldim{slice_dim}.png"
)
im.save(outfile)