From 041ee090f1290cdae2b59dfa669a376c3b98f471 Mon Sep 17 00:00:00 2001 From: Osvaldo A Martin Date: Fri, 16 Aug 2024 09:47:15 -0300 Subject: [PATCH] fix flaky test posterior_to_prior (#524) * fix flaky test * add more steps --- preliz/tests/test_posterior_to_prior.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/preliz/tests/test_posterior_to_prior.py b/preliz/tests/test_posterior_to_prior.py index cb5d1335..8799f9d9 100644 --- a/preliz/tests/test_posterior_to_prior.py +++ b/preliz/tests/test_posterior_to_prior.py @@ -11,7 +11,7 @@ a = pm.Normal("a", mu=0, sigma=1) b = pm.HalfNormal("b", sigma=1) y = pm.Normal("y", mu=a, sigma=b, observed=data) - idata = pm.sample(tune=200, draws=200) + idata = pm.sample(tune=200, draws=500, random_seed=2945) def test_p2p_pymc(): @@ -32,7 +32,7 @@ def test_p2p_pymc(): ) bmb_prior = {"Intercept": bmb.Prior("HalfStudentT", nu=1)} bmb_model = bmb.Model("y ~ x + x1", bmb_data, priors=bmb_prior) -bmb_idata = bmb_model.fit(tune=200, draws=200) +bmb_idata = bmb_model.fit(tune=200, draws=200, random_seed=2945) def test_p2p_bambi():