Skip to content

Commit d6535e8

Browse files
Reduce chance to fail for test_replace_vars_in_graphs_nested_reference test case (#7174)
Co-authored-by: Ricardo Vieira <28983449+ricardoV94@users.noreply.github.com>
1 parent 879dc0e commit d6535e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_pytensorf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,8 @@ def test_replace_vars_in_graphs_nested_reference():
694694
# Confirm the original `y` variable is changed in place
695695
# This is unavoidable if we want to respect the identity of the replacement variables
696696
# As when imputing `neg_x` and `x` while evaluating `new_y` above and below.
697-
assert np.abs(y.eval({x_value: 100})) > 1
697+
# This assertion could fail with probability 1/10000
698+
assert np.abs(y.eval({x_value: 10000})) > 1
698699

699700
# Only replace `y`, same replacement as before
700701
x = pm.HalfNormal.dist(1e-3, name="x")

0 commit comments

Comments
 (0)