From a2189d6c7d12426e3b8595128f7ff44349ed959a Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 30 Aug 2023 13:16:23 +0100 Subject: [PATCH] Avoid / silence warnings in refactored tests (#7905) --- test/test_transforms_v2_refactored.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_transforms_v2_refactored.py b/test/test_transforms_v2_refactored.py index c7a40bbb47b..9de1ed6d78a 100644 --- a/test/test_transforms_v2_refactored.py +++ b/test/test_transforms_v2_refactored.py @@ -821,7 +821,7 @@ def test_float16_no_rounding(self): # Non-regression test for https://github.com/pytorch/vision/issues/7667 input = make_image_tensor(self.INPUT_SIZE, dtype=torch.float16) - output = F.resize_image(input, size=self.OUTPUT_SIZES[0]) + output = F.resize_image(input, size=self.OUTPUT_SIZES[0], antialias=True) assert output.dtype is torch.float16 assert (output.round() - output).abs().sum() > 0 @@ -1375,6 +1375,7 @@ def test_transform_noop(self, make_input, device): assert_equal(output, input) +@pytest.mark.filterwarnings("ignore:The provided center argument has no effect") class TestRotate: _EXHAUSTIVE_TYPE_AFFINE_KWARGS = dict( # float, int