Skip to content

Commit 69b7975

Browse files
add regression test for issue 3965 (#3979)
* add regression test for issue 3965 * pass on the tune argument to fix #3965 closes #3965
1 parent e88c2f9 commit 69b7975

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pymc3/step_methods/hmc/quadpotential.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def update(self, sample, grad, tune):
307307
self._ngrads2 += 1
308308

309309
if self._n_samples <= 150:
310-
super().update(sample, grad)
310+
super().update(sample, grad, tune)
311311
else:
312312
self._update((self._ngrads1 / self._grads1) ** 2)
313313

pymc3/tests/test_quadpotential.py

+6
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,9 @@ def test_full_adapt_sampling(seed=289586):
283283
pymc3.sample(
284284
draws=10, tune=1000, random_seed=seed, step=step, cores=1, chains=1
285285
)
286+
287+
288+
def test_issue_3965():
289+
with pymc3.Model():
290+
pymc3.Normal('n')
291+
pymc3.sample(100, tune=300, chains=1, init='advi+adapt_diag_grad')

0 commit comments

Comments
 (0)