Skip to content

Commit db07070

Browse files
Fix flaky test pymc-devs#5063
The at.slinalg.solve applies the finite-checks also in shape-inference. Since 00e6eb9 we do shape checks every time, making this test error out with a 75 % probability.
1 parent c06c2f4 commit db07070

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pymc/tests/test_step.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -983,12 +983,11 @@ def test_bad_init_parallel(self):
983983
sample(init=None, cores=2, random_seed=1)
984984
error.match("Initial evaluation")
985985

986-
@pytest.mark.xfail(reason="Start shape checks that were previously skipped run into ValueError")
987986
def test_linalg(self, caplog):
988987
with Model():
989988
a = Normal("a", size=2, initval=floatX(np.zeros(2)))
990989
a = at.switch(a > 0, np.inf, a)
991-
b = at.slinalg.solve(floatX(np.eye(2)), a)
990+
b = at.slinalg.solve(floatX(np.eye(2)), a, check_finite=False)
992991
Normal("c", mu=b, size=2, initval=floatX(np.r_[0.0, 0.0]))
993992
caplog.clear()
994993
trace = sample(20, init=None, tune=5, chains=2, return_inferencedata=False)

0 commit comments

Comments
 (0)