Skip to content

seed flaky test GARCH11::test_batched_size #7708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/distributions/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,9 @@ def test_logp(self):
@pytest.mark.parametrize("explicit_shape", (True, False))
def test_batched_size(self, explicit_shape, batched_param):
steps, batch_size = 100, 5
param_val = np.square(np.random.randn(batch_size))
random_seed = 800
rng = np.random.default_rng(random_seed)
param_val = np.square(rng.random(batch_size))
init_kwargs = {
"omega": 1.25,
"alpha_1": 0.5,
Expand All @@ -801,7 +803,7 @@ def test_batched_size(self, explicit_shape, batched_param):
with Model() as t0:
y = GARCH11("y", **kwargs0)

y_eval = draw(y, draws=2, random_seed=800)
y_eval = draw(y, draws=2, random_seed=rng)
assert y_eval[0].shape == (batch_size, steps)
assert not np.any(np.isclose(y_eval[0], y_eval[1]))

Expand Down
Loading