-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
BUG: pymc.sample_smc
fails with pymc.CustomDist
#7224
Comments
] |
I tested |
As mentioned in the linked PR, I cannot reproduce the problem locally or on Google Colab, so it may not be a bug but an issue with how it was installed / VSCode: https://colab.research.google.com/drive/1I1n6c9IlmXknIfhxC5s7sAQghv0vfRSY?usp=sharing Can you try to test with latest PyMC and directly from the terminal? |
Could also be a Windows-only bug, so perhaps someone with a Windows machine can try to reproduce. We can run the new test on the Windows job if it's not running right now |
I encountered the same exception below and confirmed the following facts.
The code mentioned above https://colab.research.google.com/drive/1I1n6c9IlmXknIfhxC5s7sAQghv0vfRSY?usp=sharing So, I suspect the problem may be platform-dependent, something like a "cloudpickle on Windows" problem. |
Describe the issue:
pymc.sample_smc
raises aNotImplementedError
due to a missing logp method if apymc.CustomDist
is used in a model withoutdist
argument. In addition to usingdist
, switching topm.Potential
works.Reproduceable code example:
Error message:
PyMC version information:
Also fails with these environments
conda_env.txt
conda_env_dev.txt
Context for the issue:
I'm testing a model which suffers from slow sampling, possibly due to expensive gradient calculations. I tested SMC as a possible solution as suggested on the forums but got this error message.
Using the
dist
argument could work in most cases, but there's cases when the distributions provided bypymc
are not enough. Usingpm.Potential
could help with sampling but that would in turn make forward sampling less straightforward.The text was updated successfully, but these errors were encountered: