You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was poking around to see if we should change the docstrings of check_bounds in pm.Model to mention this might not be safe in the presence of discrete variables and I found this strange error:
Traceback (most recent call last):
File "/home/ricardo/Documents/Projects/pymc3-venv/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3418, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-60-ca8c3478b1dc>", line 3, in <module>
trace = pm.sample()
File "/home/ricardo/Documents/Projects/pymc3/pymc3/sampling.py", line 515, in sample
step = assign_step_methods(model, step, step_kwargs=kwargs)
File "/home/ricardo/Documents/Projects/pymc3/pymc3/sampling.py", line 217, in assign_step_methods
return instantiate_steppers(model, steps, selected_steps, step_kwargs)
File "/home/ricardo/Documents/Projects/pymc3/pymc3/sampling.py", line 138, in instantiate_steppers
step = step_class(vars=vars, **args)
File "/home/ricardo/Documents/Projects/pymc3/pymc3/step_methods/metropolis.py", line 187, in __init__
self.delta_logp = delta_logp(model.logpt, vars, shared)
File "/home/ricardo/Documents/Projects/pymc3/pymc3/step_methods/metropolis.py", line 888, in delta_logp
logp1 = pm.CallableTensor(logp0)(inarray1)
File "/home/ricardo/Documents/Projects/pymc3/pymc3/aesaraf.py", line 308, in __call__
(oldinput,) = inputvars(self.tensor)
ValueError: not enough values to unpack (expected 1, got 0)
I don't see why changing the check_bounds flag would lead to any issues in sampling. I can call the logp method for any value and I get a finite (and wrong) evaluation as would be expected from removing the bounds:
I was poking around to see if we should change the docstrings of check_bounds in pm.Model to mention this might not be safe in the presence of discrete variables and I found this strange error:
I don't see why changing the check_bounds flag would lead to any issues in sampling. I can call the logp method for any value and I get a finite (and wrong) evaluation as would be expected from removing the bounds:
I tried with a couple of other Discrete Variables and I had no issues either. Obviously it works as expected with the flag set to True
The text was updated successfully, but these errors were encountered: