Skip to content

Commit

Permalink
Do not use initval in test model
Browse files Browse the repository at this point in the history
PRs pymc-devs#7508 and pymc-devs#7492 introduced incompatible changes but were not tested simultaneously.

Deepcopying the steps in the tests leads to deepcopying the model which uses `clone_model`, which in turn does not support initvals.
  • Loading branch information
ricardoV94 committed Oct 8, 2024
1 parent 465d8ac commit 137fc10
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,14 @@ def mv_simple():
p = np.array([[2.0, 0, 0], [0.05, 0.1, 0], [1.0, -0.05, 5.5]])
tau = np.dot(p, p.T)
with pm.Model() as model:
pm.MvNormal(
x = pm.MvNormal(
"x",
pt.constant(mu),
tau=pt.constant(tau),
initval=np.array([0.1, 1.0, 0.8]),
)
H = tau
C = np.linalg.inv(H)
return model.initial_point(), model, (mu, C)
return {"x": np.array([0.1, 1.0, 0.8]).astype(x.type.dtype)}, model, (mu, C)


def mv_simple_coarse():
Expand Down

0 comments on commit 137fc10

Please sign in to comment.