funsor icon indicating copy to clipboard operation
funsor copied to clipboard

Make Distribution.enumerate_support return a Delta

Open eb8680 opened this issue 4 years ago • 0 comments

In #346, motivated by work in Pyro on a Funsor-based Pyro backend, I added a generic enumerate_support method to funsor.distribution.Distribution which returns a to_funsor-ed version of the output of the underlying backend distribution's enumerate_support method. However, it would be more natural from the rest of Funsor's perspective to have enumerate_support return a Delta over the support values plus a weight tensor, like Funsor.sample.

This issue is to remind me to make that change at some point after more of contrib.funsor is finished in Pyro, unless someone else wants to take a stab at it.

eb8680 avatar Aug 07 '20 19:08 eb8680