-
-
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
pt.max
is not differentiable in PyMC models
#7251
Comments
|
|
hi! i can take up this issue. i can see that this has to sort out dealing with gradients in the rewrites for some specific functions. could you provide some more details for me to start working |
@tanish1729 this one is not really a beginner friendly issue. I'll try and fix it now myself. Let us know if you need help finding more suitable issues |
oh great i see you did this yourself. i'll go through the code and see if i can understand it. |
You can filter issues on Github by labels: https://github.com/pymc-devs/pymc/issues?q=is%3Aissue+is%3Aopen+label%3A%22beginner+friendly%22 |
@ricardoV94 Thanks so much for fixing this so quickly. I can verify this solved the issue in my model and I am now able to run my model using NUTS only. Brings runtime down from ~2 hours to 10 minutes (3 minutes if I use an experimental NUTS sampler such as numpyro). |
You're welcome. By the way we don't consider the numpyro integration experimental anymore |
Description
The following
model.dlogp()
raises aNotImplemented
error:This should be differentiable (
pt.max
has gradients implemented), so it seems like something is going wrong in rewrites, either with respect to logp rewrites or with respect toMaxAndArgmax
The text was updated successfully, but these errors were encountered: