Skip to content

Commit

Permalink
revert then modify seed param edit
Browse files Browse the repository at this point in the history
  • Loading branch information
AFg6K7h4fhy2 committed Feb 11, 2025
1 parent a6b9e88 commit 9e83506
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions forecasttools/sbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(
observed_vars: dict[str, str],
num_simulations=10,
sample_kwargs=None,
seed=1234,
seed=None,
**kwargs,
) -> None:
"""
Expand All @@ -40,7 +40,7 @@ def __init__(
Arguments passed to `numpyro.sample`. Defaults to
`dict(num_warmup=500, num_samples=100, progress_bar = False)`.
Which assumes a MCMC sampler e.g. NUTS.
seed : int
seed : random.PRNGKey
Random seed.
kwargs : dict
Keyword arguments passed to `numpyro` models.
Expand All @@ -49,8 +49,8 @@ def __init__(
sample_kwargs = dict(
num_warmup=500, num_samples=100, progress_bar=False
)
seed = random.PRNGKey(seed)

if seed is None:
seed = random.PRNGKey(1234)
self.mcmc_kernel = mcmc_kernel
if not hasattr(mcmc_kernel, "model"):
raise ValueError(
Expand Down

0 comments on commit 9e83506

Please sign in to comment.