Reproducing PyMC3 AR(1) tutorial in PyMC4

I’m trying to reproduce the PymC3 AR(1) tutorial in PyMC4. Here is what I am trying to do.

import pymc4 as pm
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import arviz as az


T = 100
y = np.zeros((T,))

for i in range(1,T):
    y[i] = 0.95 * y[i-1] + np.random.normal()

y = y.reshape(len(y), -1)


def model(data):
    x = yield pm.Normal(loc=0., scale=1., name="beta")
    like = yield pm.AR(
    return like

trace =  pm.sample(model(y), num_samples=500)

However, it does not allow me to use x as the coefficients and I’m getting the error:

TypeError: Value passed to parameter 'input' has DataType variant not in list of allowed values: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, float16, uint32, uint64

My aim is to add the AR(1) simulation example to pymc4/notebooks. Hope I have not missed any obvious guideline.

That was a mistake to use the observed_time_series parameter. I have also tried using observed=data but still getting the same error.