How can we build a mixture of mixtures?

You said : “Mixture of Mixture is really stretching the intended use case of Mixture class”.

But it worked on version 3.3 ! (not the logp function of a mixture, but the rest was ok!)
So the master code looks like a regression on that point.

After all, a mixture is also a distribution, so there is no theoretical reason not to be able to build mixture of mixtures ?
It would be very sad to abandon this marvelous feature… It helps to build cleaner & more structured models.

Writing explicitely the logp function doesn’t seem like a good solution to me, because this can be considered like “duplicate code” : I’ll have to duplicate logp fomulas from the distribution components… (errors will be very hard to track)
(Thanks to the link to the code example you provided, I found it very interesting, but I think I will use another solution.)

In my case I’ll end up putting all components in one unique mixture, and
duplicate the model part where I need to access the logp function. It will be only model description duplicate, not inner code with math formulas. So I expect it will be less risky and easier to debug, but I admit that this is not totally satisfying…

So It would be reallly cool if the mixture of mixture feature work on the next pymc3 release.

Thanks for all your answers and suggestions.