vb690
December 13, 2020, 9:05pm
9
Hi Leon,
if you can’t find an issue that suits your problem maybe try to open one on GitHub. Problems with advi seem to pop out quite frequently in discussions.
Here OP used advi
Hello,
I ran a model last night while I went to bed and pymc3 gets stuck and just doesn’t start sampling. i’m running pymc3 version 3.6
Auto-assigning NUTS sampler...
Initializing NUTS using advi...
Average Loss = 2.3802e+08: 6%|▋ | 12606/200000 [00:06<01:28, 2117.90it/s]
Convergence achieved at 12800
Interrupted at 12,799 [6%]: Average Loss = 2.918e+08
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [sd, intercept]
Sampling 4 chains: 0%| | 0/22000 [00:00<?, ?draws/s]
…
A quick update. When I sample with njobs = 1, NUTS works.
opened 03:28PM - 15 Jun 20 UTC
closed 08:51AM - 24 Jun 20 UTC
When initializing a `sample` run with `advi+adapt_diag_grad`, the init runs with… out error, but when sampling starts it immediately fails. It appears the `tune` argument is not being passed from `sample`:
```
Traceback (most recent call last):
File "/Users/cfonnesbeck/Repositories/pymc3/pymc3/parallel_sampling.py", line 128, in run
self._start_loop()
File "/Users/cfonnesbeck/Repositories/pymc3/pymc3/parallel_sampling.py", line 182, in _start_loop
point, stats = self._compute_point()
File "/Users/cfonnesbeck/Repositories/pymc3/pymc3/parallel_sampling.py", line 209, in _compute_point
point, stats = self._step_method.step(self._point)
File "/Users/cfonnesbeck/Repositories/pymc3/pymc3/step_methods/arraystep.py", line 263, in step
apoint, stats = self.astep(array)
File "/Users/cfonnesbeck/Repositories/pymc3/pymc3/step_methods/hmc/base_hmc.py", line 170, in astep
self.potential.update(hmc_step.end.q, hmc_step.end.q_grad, self.tune)
File "/Users/cfonnesbeck/Repositories/pymc3/pymc3/step_methods/hmc/quadpotential.py", line 310, in update
super().update(sample, grad)
TypeError: update() missing 1 required positional argument: 'tune'
```
Here is the call:
trace = pm.sample(1000, tune=3000, return_inferencedata=True, init='advi+adapt_diag_grad')
Running current master (3.9.0) on macOS and Python 3.8.