From 82e6abebcb38912ab8cc984dae080d4c93de2437 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Wed, 27 Mar 2024 20:13:03 +0100 Subject: [PATCH] test: skip panoptic quality for PT <1.12 (#2478) --- tests/unittests/utilities/test_plot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/unittests/utilities/test_plot.py b/tests/unittests/utilities/test_plot.py index e059bd2098b..360deca4a71 100644 --- a/tests/unittests/utilities/test_plot.py +++ b/tests/unittests/utilities/test_plot.py @@ -169,6 +169,7 @@ WordInfoPreserved, ) from torchmetrics.utilities.imports import ( + _TORCH_GREATER_EQUAL_1_12, _TORCHAUDIO_GREATER_EQUAL_0_10, ) from torchmetrics.utilities.plot import _get_col_row_split @@ -341,6 +342,9 @@ _panoptic_input, _panoptic_input, id="panoptic quality", + marks=pytest.mark.skipif( + not _TORCH_GREATER_EQUAL_1_12, reason="Panoptic Quality metric requires PyTorch 1.12 or later" + ), ), pytest.param(BinaryAveragePrecision, _rand_input, _binary_randint_input, id="binary average precision"), pytest.param(