In a):
- since you are already using
poutine.maskyou don’t need to mask theCategoricaldistribution with.mask - you don’t need
pyro.samplein the guide for sample sites that are observed in the model, i.e.sequencessite.
Before dealing with masking (it can be tricky) I would recommend going through pyro tutorials to get a good grasp of how pyro.sample works, how obs= keyword works, how model/guide pair should be structured, how pyro.sample is different from SomeDistribution.sample, etc.