diff --git a/tests/gp/test_hsgp_approx.py b/tests/gp/test_hsgp_approx.py index b6f03a4acc..96465e9437 100644 --- a/tests/gp/test_hsgp_approx.py +++ b/tests/gp/test_hsgp_approx.py @@ -166,7 +166,7 @@ def test_parametrization_drop_first(self, model, cov_func, X1, drop_first): assert n_coeffs == n_basis, "one was dropped when it shouldn't have been" @pytest.mark.parametrize("parameterization", ["centered", "noncentered"]) - def test_prior(self, model, cov_func, X1, parameterization): + def test_prior(self, model, cov_func, X1, parameterization, rng): """Compare HSGP prior to unapproximated GP prior, pm.gp.Latent. Draw samples from the prior and compare them using MMD two sample test. Tests both centered and non-centered parameterizations. @@ -178,7 +178,7 @@ def test_prior(self, model, cov_func, X1, parameterization): gp = pm.gp.Latent(cov_func=cov_func) f2 = gp.prior("f2", X=X1) - idata = pm.sample_prior_predictive(samples=1000) + idata = pm.sample_prior_predictive(samples=1000, random_seed=rng) samples1 = az.extract(idata.prior["f1"])["f1"].values.T samples2 = az.extract(idata.prior["f2"])["f2"].values.T