-
Notifications
You must be signed in to change notification settings - Fork 25
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
Make tilde_{assume,observe} functions behave more uniformly #76
Conversation
Codecov Report
@@ Coverage Diff @@
## master #76 +/- ##
==========================================
+ Coverage 77.46% 77.49% +0.03%
==========================================
Files 13 13
Lines 821 831 +10
==========================================
+ Hits 636 644 +8
- Misses 185 187 +2
Continue to review full report at Codecov.
|
Hopefully #84 fixes the test errors on master. |
This looks good to me. However, it is worth noting some sampling algorithms override these MH
IS
HMC
Their return values need to be updated similarly too to avoid surprises. |
Well, there's a bit of historically evolved convolution here. But since Nevertheless, it would be a good idea, IMO, to untangle all this into
|
Sounds like a good design to me. Can you also take care of changes on the Turing side? |
@phipsgabler It would be useful to add this distinction between |
All the I'll make an issue for the refactoring, but can't currently commit to it. There would be stuff to update in Turing as well, then, which makes it more fiddly. |
Seems like I'm too late to veto the release, but anyway...
The PR changes the tilde functions used in the generated code to include
acclogp!
, and always just return the sampled value (instead of sometimes the logp, sometimes the logp and the value). This is in light with the now consistent behaviour of making tildes always return their value, and cleans up the generated code a bit.It shouldn't make any difference to the outside. The
[dot_]tilde_{assume,observe}
functions were only added recently in #53 and aren't really part of the public interface --tilde
anddot_tilde
work as before.