How to modify variational inference PyMC codes to handle missing data

I just implemented your suggested solution!
It goes quite smooth except running into one error as the follow:
ParametrizationError: Discrete variables are not supported by VI: W_missing ~ Bernoulli

Do you have any thoughts on how to fix it? Thanks!