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
Hello I have been using the pococmc package to sample parameters of an ODE-based system. Occasionally, an error arises in my runs: AttributeError: 'float' object has no attribute 'item'. This happens at different times depending on which seed I use, and sometimes doesn't happen at all. It seems like sigma is a Tensor object but is somehow incorrectly being typed as a float? Any ideas how to fix this?
Error trace example:
sampler.run(p_0, ess, gamma, int(n_dim), int(1000*n_dim), progress=True)
File "/opt/miniconda3/envs/pyPoco/lib/python3.10/site-packages/pocomc/sampler.py", line 405, in run
self.u, self.x, self.J, self.L, self.P = self._mutate(
File "/opt/miniconda3/envs/pyPoco/lib/python3.10/site-packages/pocomc/sampler.py", line 532, in _mutate
results = preconditioned_metropolis(
File "/opt/miniconda3/envs/pyPoco/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/opt/miniconda3/envs/pyPoco/lib/python3.10/site-packages/pocomc/mcmc.py", line 167, in preconditioned_metropolis
scale=sigma.item() / (2.38 / np.sqrt(n_dim)),
AttributeError: 'float' object has no attribute 'item'
The text was updated successfully, but these errors were encountered:
I am getting the same error, but for me this error raises every time I run pocomc on a particular model system. However, it never once raised that error when I was running on a simpler system. I would be interested in knowing if there has been any work toward addressing this issue in the code?
Hello I have been using the pococmc package to sample parameters of an ODE-based system. Occasionally, an error arises in my runs:
AttributeError: 'float' object has no attribute 'item'
. This happens at different times depending on which seed I use, and sometimes doesn't happen at all. It seems like sigma is a Tensor object but is somehow incorrectly being typed as a float? Any ideas how to fix this?Error trace example:
The text was updated successfully, but these errors were encountered: