-
Notifications
You must be signed in to change notification settings - Fork 292
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
Describe the issue:
cell 22 of the file https://github.com/pymc-devs/pymc-examples/blob/main/examples/howto/wrapping_jax_function.ipynb throws error
reference issue pymc-devs/pymc#7088 (comment)
with pm.Model(rng_seeder=int(rng.integers(2**30))) as model:
emission_signal = pm.Normal("emission_signal", 0, 1)
emission_noise = pm.HalfNormal("emission_noise", 1)
p_initial_state = pm.Dirichlet("p_initial_state", np.ones(3))
logp_initial_state = pt.log(p_initial_state)
p_transition = pm.Dirichlet("p_transition", np.ones(3), size=3)
logp_transition = pt.log(p_transition)
loglike = pm.Potential(
"hmm_loglike",
hmm_logp_op(
emission_observed,
emission_signal,
emission_noise,
logp_initial_state,
logp_transition,
),
)`
Reproduceable code example:
with pm.Model(rng_seeder=int(rng.integers(2**30))) as model:
emission_signal = pm.Normal("emission_signal", 0, 1)
emission_noise = pm.HalfNormal("emission_noise", 1)
p_initial_state = pm.Dirichlet("p_initial_state", np.ones(3))
logp_initial_state = pt.log(p_initial_state)
p_transition = pm.Dirichlet("p_transition", np.ones(3), size=3)
logp_transition = pt.log(p_transition)
loglike = pm.Potential(
"hmm_loglike",
hmm_logp_op(
emission_observed,
emission_signal,
emission_noise,
logp_initial_state,
logp_transition,
),
)`Error message:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[22], line 1
----> 1 with pm.Model(rng_seeder=int(rng.integers(2**30))) as model:
2 emission_signal = pm.Normal("emission_signal", 0, 1)
3 emission_noise = pm.HalfNormal("emission_noise", 1)
File ~/.local/lib/python3.8/site-packages/pymc/model.py:221, in ContextMeta.__call__(cls, *args, **kwargs)
219 instance: "Model" = cls.__new__(cls, *args, **kwargs)
220 with instance: # appends context
--> 221 instance.__init__(*args, **kwargs)
222 return instance
TypeError: __init__() got an unexpected keyword argument 'rng_seeder'`PyMC version information:
5.6.1
Context for the issue:
since cell 22 ipython notebook example won't work
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers