From 19a1fe0be5620825d212e93fc5078538cef0abd4 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 6 Sep 2023 03:26:56 -0700 Subject: [PATCH] [fbsync] Avoid / silence warnings in refactored tests (#7905) Reviewed By: matteobettini Differential Revision: D48900368 fbshipit-source-id: e8f6166040ab9a190da85a0292c372bc3423200b --- 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