Is there a way to use `poutine.uncondition` on a given set of sample sites rather than all?

I am using the Predictive to do prior predictive sampling. To do so I must remove the obs statement in the likelihood if I want to sample from it as well. I use poutine.uncondition to do so, which works great.

However I also have other conditioned sample sites that I want to keep conditioned. As far as I can tell it is not possible to pass in which sample sites to uncondition in poutine.uncondition. Is this the case, and if yes, what other solutions are there?

Thanks!

probably the easiest would be to always write your model in a fully unconditioned way and then add in obs statements as needed using condition.

alternatively on the pattern of e.g. hide/expose in block (code) you could add similar functionality to uncondition

Oh that is genius. I will do that, thanks so much