Skip to content

Commit fa8f763

Browse files
committed
add test for fit
1 parent 02fcb2e commit fa8f763

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pymc_experimental/tests/model/transforms/test_autoreparam.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,10 @@ def test_random_draw(model_c: pm.Model, model_nc):
5656
np.testing.assert_allclose(c.std(), v_0.std())
5757
np.testing.assert_allclose(v_05.std(), v_1.std())
5858
np.testing.assert_allclose(v_1.std(), nc.std())
59+
60+
61+
def test_fit(model_c):
62+
model_v, vip = vip_reparametrize(model_c, ["g"])
63+
with model_v:
64+
vip.fit(random_seed=42)
65+
np.testing.assert_allclose(vip.get_lambda()["g"], 0, atol=0.01)

0 commit comments

Comments
 (0)