logpdf
for a MixtureModel
fails to differentiate (for me at least with all AD backends), prohibiting use of Hamiltonian MC and its derivatives for fitting models.
The easy workaround is writing Distributions.logpdf(m::MixtureModel, x::Float64) = log(pdf(m, x))
and the cost of numerical stability is relatively minor.
Googling “turing mixture model” gives this tutorial as the first result, so maybe it would be helpful to add a footnote to this tutorial demonstrating how the same can be achieved more efficiently if we don’t need to sample cluster assignments?