-
Notifications
You must be signed in to change notification settings - Fork 32
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
Export LogDensityFunction
#820
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release-0.35 #820 +/- ##
=============================================
Coverage 84.60% 84.60%
=============================================
Files 34 34
Lines 3832 3832
=============================================
Hits 3242 3242
Misses 590 590 ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 13530876693Details
💛 - Coveralls |
1 similar comment
Pull Request Test Coverage Report for Build 13530876693Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 13530876693Details
💛 - Coveralls |
Happy with this, unless we are going to what @yebai proposed and merge |
They are different: I think that this in turn is because the LDP interface doesn't use abstract types. Thus, if you have a type struct T <: ObeysLDPInterface
fields...
end
sample(::ObeysLDPInterface,
::AbstractSampler,
...
) Instead, if you want to sample from something that obeys it, you have to wrap it in a I do find all this indirection a bit confusing and I would love to be able to simplify it, but I'm not sure if it's possible, and in any case I don't think it's a matter for this release |
Can we make EDIT: if |
@yebai How about making LogDensityFunction subtype AbstractModel? I think that might sort it out. But it needs slightly deeper investigation, and I think it's best we leave this for another minor version. As I understand it, the reason why LogDensityModel doesn't obey LDP is mainly to avoid method ambiguities: TuringLang/AbstractMCMC.jl#110 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging the two sounds great if it works out. However, on a call Penny also just pointed out that Turing.jl already exports LogDensityFunction. In that case I think it should be exported in DPPL as well, and doing so doesn't cause any more breakage in the future, because any breakage of LDF is breaking for Turing.jl already as is. Hence happy to merge this and release it in v0.35 even if the LDF-LDM merging is going to happen soonish.
I'll merge first, and I'll open another issue to track the possibilities. |
Closes #816