Skip to content

Commit

Permalink
use init_to_sample as init_strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
damonbayer committed Sep 20, 2024
1 parent 50af19b commit a19f1ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyrenew/metaclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import numpy as np
import polars as pl
from jax.typing import ArrayLike
from numpyro.infer import MCMC, NUTS, Predictive
from numpyro.infer import MCMC, NUTS, Predictive, init_to_sample

from pyrenew.mcmcutils import plot_posterior, spread_draws

Expand Down Expand Up @@ -176,6 +176,9 @@ def _init_model(
if "find_heuristic_step_size" not in nuts_args:
nuts_args["find_heuristic_step_size"] = True

if "init_strategy" not in nuts_args:
nuts_args["init_strategy"] = init_to_sample

if mcmc_args is None:
mcmc_args = dict()

Expand Down

0 comments on commit a19f1ba

Please sign in to comment.