-
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
Decouple from Distributions.jl #523
Comments
@devmotion @yebai maybe? |
It is sensible, but perhaps for DynamicPPL/Turing 2.0. |
It is a very trivial change to make though without any real maintenance cost, while allowing 3rd-party developers to more easily extend how things are treated. I personally would have found this useful in some of the performance-sensitive projects we've been involved in. |
Here are some functions that we should consider if this goes ahead:
We could have generic fallbacks for all distributions from EDIT: optional API that can be very helpful
|
I'm on vacation, hence only some quick comments:
IMO this is a major disadvantage: why should we not let the whole community benefit from AD improvements? IMO we should just add AD rules for
Isn't this what interfaces such as DensityInterface are designed for, which are AFAIK supported by both Distributions and MeasureTheory? |
I most certainly agree with this! But sometimes we might want to make more "opinionated" changes that are specifically beneficial to Turing. For example, would you be willing to introduce an
Aaah that might be true! Had completely forgotten about DensityInterface; my bad. |
I think in general that should neither be done in Distributions nor in DynamicPPL. According to my understanding, |
I very much agree with you, but the reality is that AD performance is a huge bottleneck for us. Being able to do some specialized stuff here and there that is "not great in general" could be quite useful to squeeze out more perf. |
There are not enough benefits since Distribution will be the only probability distribution package for the foreseeable future. Furthermore, Please reopen if the situation changes. |
Good people of DynamicPPL-land. I'm back from vacation, which also means I'm back with crazy ideas.
Here's my first one for now:
I ask for the following reasons:
logpdf
andrand
methods from Distributions, it becomes much easier to support non-Distributions, e.g. MeasureTheory.jl.Making the change would be trivial since it would just be a matter of adding
and so on. It would also, depending on how we execute this, provide use with a way to not do all the type-piracy we do in DistributionsAD.jl (we could potentially define a logpdf-like thing there, which is then used in DynamicPPL.jl).
Thoughts?
The text was updated successfully, but these errors were encountered: