How to write & evaluate state space model in PyMC4

I’m tring to write down state space model in PyMC4 and sample posterior distributions of parameters as in PyMC3.
But the acceptance ratio of all variables are 0 and chain values do not change.
Is there some mistake in this code?


model = pm.Model(N=N, y=datay)

def st(cfg):    
    mu0 = ed.Normal(name='muZero', loc=0.0, scale=1.0)
    sigmaW = ed.InverseGamma(name='sigmaW', concentration=1.0, rate=1.0)    
    sigmaV = ed.InverseGamma(name='sigmaV', concentration=1.0, rate=1.0)
    mu =[0]*cfg.N
    mu[0] = ed.Normal(name='mu0', loc=mu0, scale=sigmaW)
    for n in range(1, N):
        mu[n] = ed.Normal(name='mu'+str(n), loc=mu[n-1], scale=sigmaW)    
    for n in range(N):
        y[n]= ed.Normal(name='y'+str(n), loc=mu[n], scale=sigmaV)
    return y

trace = pm.sample(model)

At this point PyMC4 is more of a prototype and I would expect many bugs. If you don’t want to actively develop the package I would stick to PyMC3 which we will continue to support.