Fix xfail markers on failing tests
@@ -7,7 +7,6 @@ from pyro.distributions import Bernoulli, Categorical
from tests.common import assert_equal
-@pytest.mark.xfail(reason="TODO: clamp logits to ensure finite values")
@pytest.mark.parametrize('init_tensor_type', [torch.DoubleTensor, torch.FloatTensor])
def test_bernoulli_underflow_gradient(init_tensor_type):
p = Variable(init_tensor_type([0]), requires_grad=True)
@@ -18,7 +17,6 @@ def test_bernoulli_underflow_gradient(init_tensor_type):
assert_equal(p.grad.data[0], 0)
-@pytest.mark.xfail(reason="TODO: clamp logits to ensure finite values")
@pytest.mark.parametrize('init_tensor_type', [torch.DoubleTensor, torch.FloatTensor])
def test_bernoulli_overflow_gradient(init_tensor_type):
p = Variable(init_tensor_type([1e32]), requires_grad=True)
@@ -29,6 +27,7 @@ def test_bernoulli_overflow_gradient(init_tensor_type):
assert_equal(p.grad.data[0], 0)
+@pytest.mark.xfail(reason="TODO: clamp logits to ensure finite values")
@pytest.mark.parametrize('init_tensor_type', [torch.FloatTensor])
def test_bernoulli_with_logits_underflow_gradient(init_tensor_type):
p = Variable(init_tensor_type([-1e40]), requires_grad=True)
@@ -39,6 +38,7 @@ def test_bernoulli_with_logits_underflow_gradient(init_tensor_type):
assert_equal(p.grad.data[0], 0)
+@pytest.mark.xfail(reason="TODO: clamp logits to ensure finite values")
@pytest.mark.parametrize('init_tensor_type', [torch.DoubleTensor, torch.FloatTensor])
def test_bernoulli_with_logits_overflow_gradient(init_tensor_type):
p = Variable(init_tensor_type([1e40]), requires_grad=True)
