From fd3671c179166f66d07267c0f3d6b2e511d53dc3 Mon Sep 17 00:00:00 2001 From: Eli Date: Thu, 15 Feb 2024 18:32:42 -0500 Subject: [PATCH] unxfail cases --- tests/robust/test_handlers.py | 7 +++++-- tests/robust/test_ops.py | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/robust/test_handlers.py b/tests/robust/test_handlers.py index 71296414d..12bb81c8f 100644 --- a/tests/robust/test_handlers.py +++ b/tests/robust/test_handlers.py @@ -31,8 +31,11 @@ lambda m: pyro.infer.autoguide.AutoNormal(pyro.poutine.block(hide=["y"])(m)), {"y"}, 1, - marks=pytest.mark.xfail( - reason="torch.func autograd doesnt work with PyroParam" + marks=( + [pytest.mark.xfail(reason="torch.func autograd doesnt work with PyroParam")] + if tuple(map(int, pyro.__version__.split("+")[0].split(".")[:3])) + <= (1, 8, 6) + else [] ), ), ] diff --git a/tests/robust/test_ops.py b/tests/robust/test_ops.py index e680da624..8fa320dcf 100644 --- a/tests/robust/test_ops.py +++ b/tests/robust/test_ops.py @@ -31,8 +31,11 @@ lambda m: pyro.infer.autoguide.AutoNormal(pyro.poutine.block(hide=["y"])(m)), {"y"}, 1, - marks=pytest.mark.xfail( - reason="torch.func autograd doesnt work with PyroParam" + marks=( + [pytest.mark.xfail(reason="torch.func autograd doesnt work with PyroParam")] + if tuple(map(int, pyro.__version__.split("+")[0].split(".")[:3])) + <= (1, 8, 6) + else [] ), ), ]