-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Nutpie and PYMC Hurdle Gamma Distribution #163
Comments
This looks like an issue with the numba backend of pytensor. In the meantime, you can also give the jax backend a go: compiled = nutpie.compile_pymc_model(model, backend="jax", gradient_backend="jax")
trace = nutpie.sample(compiled) |
Sure. Here is a simple model that replicates the error:
This fails with the same "TypeError: The fgraph of ScalarLoop must be exclusively composed of scalar operations." |
Sorry for the delay. |
No worries. Thank you for looking into it and opening the issue. |
@aseyboldt I installed the current dev version of pytensor as I saw that they had resolved the issue you posted there #pymc-devs/pytensor#1130. The hurdle-gamma now runs via Nutpie. I tested it on the sample script ##163 (comment) and it ran. However, it drops down into object mode for same parameters and is slower than pymc's native sampler for this sample code and on some proprietary data and model I have (10 seconds via pymc default sampler vs 12 min for nutpie for my prop). I am not sure if this should go to another issue and this one should be closed. It seems that it is more a problem with the hurdle-gamma implementation in PYMC #pymc-devs/pymc#7630 (comment) . Please let me know if I should close this issue. |
Thanks for the update. |
We should also just implement hurdles properly. There's no reason to involve the cdf as it's just a trick for Mixture to work with a Continuous and the DiracDelta(0) components. We are truncating the continuous component at epsilon, and that's why those Ops show up in the grad. |
Pardon my ignorance, but I cannot get nutpie to sample from PYMC's hurdle-gamma likelihood.
I get "TypeError: The fgraph of ScalarLoop must be exclusively composed of scalar operations."
Is this just not possible at this time?
The text was updated successfully, but these errors were encountered: