Skip to content
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

LogDensityFunction should be exported #816

Open
penelopeysm opened this issue Feb 19, 2025 · 1 comment · Fixed by #820 · May be fixed by #779
Open

LogDensityFunction should be exported #816

penelopeysm opened this issue Feb 19, 2025 · 1 comment · Fixed by #820 · May be fixed by #779

Comments

@penelopeysm
Copy link
Member

penelopeysm commented Feb 19, 2025

I think we use it upstream quite a bit. and also I have in mind that for some of the sampler/modelling refactoring what we really want to do is to implement methods like

sample(::LogDensityFunction, ::MySampler, N)

(note that sampling from a LogDensityFunction right now is surprisingly non-trivial, it has to be wrapped yet again in a AbstractMCMC.LogDensityModel or something like that)

and have

sample(::Model, ::MySampler, N) forward to that.

It would be possible, but very annoying to do this if LogDensityFunction isn't exported, so I think we should export it.

@yebai
Copy link
Member

yebai commented Feb 20, 2025

We could consider merging DynamicPPL.LogDensityFunction and AbstractMCMC.LogDensityModel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants