Hi, maybe you should transform the observed data from [-1,0,1] to [0,1,2] due to the sample result of cat distribution being >= 0.
Like obs = pm.Categorical('obs', p=p, observed=y_train+1)
For q2, we can get the shape of RV by RV.tag.test_value.shape.