Context for the issue:
Right now in pymc the sample method on Approximation store the model that was used for training. This makes it harder to use variational inference with the posterior predictive sampling and other parts of the Bayesian workflow.
It would be nice if modelcontext was used here instead.
Also, it's probably time to just generate the InferenceData object directly