Skip to content

distributions.mixtures._MixtureBase: mixtures lack reparameterized sa…#2106

Merged
fehiepsi merged 1 commit intopyro-ppl:masterfrom
esennesh:bugfix/mixture_distributions_no_rsample
Dec 14, 2025
Merged

distributions.mixtures._MixtureBase: mixtures lack reparameterized sa…#2106
fehiepsi merged 1 commit intopyro-ppl:masterfrom
esennesh:bugfix/mixture_distributions_no_rsample

Conversation

@esennesh
Copy link
Contributor

…mpling

Testing Done: create a mixture distribution, check its has_rsample

…mpling

Testing Done: create a mixture distribution, check its has_rsample

Signed-off-by: Eli Sennesh <elisennesh@gmail.com>
@tillahoffmann
Copy link
Collaborator

Thanks for the PR! _MixtureBase should already implement has_rsample because it inherits from Distribution, e.g.,

$ root@557f2b12b9a8:/# python -c "import numpyro; print(numpyro.distributions.mixtures._MixtureBase().has_rsample)"
True

Is your concern that it returns True?

@fehiepsi
Copy link
Member

I think we don't have rsample for those distributions. The default check in Distribution does not apply because we don't have reparam parameters defined here.

@fehiepsi fehiepsi merged commit 7bd4955 into pyro-ppl:master Dec 14, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants