I‘m trying to transform my code from v3 to v5.But I got problems.In v3,I want to get all the samples after the sampling of pymc is completed,
Here are my codes
All of the model code looks fine. You will just need to familiarize yourself with the new Arviz InferenceData object that is returned from sampling. See here for documentation about idata, or here for a discussion with a user who had a similar problem.
Amusingly (in the context of this thread), the Arviz idata docs reference PyMC3, but there will not be any differences with respect to working with idata.
The CustomDist API has been significantly changed between v3 and v5. For you this is good news, because it looks like your likelihood function is written entirely of pytensor ops whose logp graph can be automatically determined. See here for what appears to be a similar case