From 2be7287fdf84715f69ac1d15c989172fa16e30b9 Mon Sep 17 00:00:00 2001 From: Antoine Simoulin Date: Fri, 14 Nov 2025 09:12:25 -0800 Subject: [PATCH] disable torchscript deprecation errors --- test/test_transforms_v2.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/test_transforms_v2.py b/test/test_transforms_v2.py index 0f985ab9604..00ed6a8aef1 100644 --- a/test/test_transforms_v2.py +++ b/test/test_transforms_v2.py @@ -57,10 +57,9 @@ # turns all warnings into errors for this module pytestmark = [pytest.mark.filterwarnings("error")] -if sys.version_info[:2] >= (3, 12): - # torchscript relies on some AST stuff that got deprecated in 3.12, - # so we have to explicitly ignore those otherwise we'd error on warnings due to the pytestmark filter above. - pytestmark.append(pytest.mark.filterwarnings("ignore::DeprecationWarning")) +# Since torchscript is deprecated, we are explicitly ignoring those warnings. +# Otherwise we'd error on warnings due to the pytestmark filter above. +pytestmark.append(pytest.mark.filterwarnings("ignore::DeprecationWarning")) @pytest.fixture(autouse=True)