-
Notifications
You must be signed in to change notification settings - Fork 135
BUG: Possible OpFromGraph Related Issue for Choosing Samplers in MarginalModel #652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This may be related to #1, namely because |
We should check if the problem goes away again after #723 |
This may also have been solved before by: #340 |
@iAvicenna can you try running with the latest pymc-experimental? I think this is not failing anymore |
Hello I tried running this on: pymc_experimental: '0.1.0' It now goes for
Previously it was all metropolis and none of it could be changed to NUTs. Still can not force w to be sampled with NUTs. |
Strange I think I tried from main and it was all nuts |
Hmm so here is my environment (it is not minimal, it has numpyro, jax and cuda related libs cause I wanted to test gpu and also spyder kernels, let me know if you think any of those would cause a problem):
When I run the code above (forcing NUTs to everything), I get
|
You're totally right! I reproduced the example on Colab: https://colab.research.google.com/drive/1WV9YowS9uhIWhFnfPcWZ0YIqwNwiPC8t?usp=sharing I must have tried the wrong example or with some bleeding edge versions of pytensor/pymc not yet released. Let me confirm EDIT: It needs the yet unreleased version of PyMC that's on main branch. I updated the example above and it now works. Sampling will be a bit slow unless you also use the main of pymc-experimental. We got a speed up in the logp in: pymc-devs/pymc-extras#337 EDIT: I updated the example to also use bleeding pymc-experimental. To reproduce the problem just do |
I'm closing this issue here, as it seems there is nothing left to do other than re-release pymc and pymc-experimental. Let me know if I missed anything |
Uh oh!
There was an error while loading. Please reload this page.
Describe the issue:
This is an issue that arises when one uses MarginalModel in pymc_experimental as discussed here:
https://discourse.pymc.io/t/mixture-of-censored-iid-normals/13234/18
In this context, pymc automatically chooses Metropolis and or Slice as samplers for the code given below and when one tries to force NUTS it gives a NotImplementedError. According to @ricardoV94 this might be a OpFromGraph issue so he suggested I drop it here to make sure it does not get forgotten. Note that my pymc version is a bit outdated (5.9.0) because I had some issues installing pymc_experimental for later versions but Ricardo has confirmed that he can reproduce the bug.
Reproducable code example:
Error message:
PyTensor version information:
pytensor 2.17.3 py311hb755f60_0 conda-forge
pymc 5.9.0 hd8ed1ab_0 conda-forge
pymc-base 5.9.0 pyhd8ed1ab_0 conda-forge
pymc-experimental 0.0.13 pypi_0 pypi
platform: Linux, Ubuntu 20.02
Context for the issue:
This results in posteriors for this model being more wobbly. It is not high priority for me as I can still proceed with Metropolis and replace it later with NUTs.
The text was updated successfully, but these errors were encountered: