Trying to use pm.BinaryMetropolis()

with pm.Model() as logistic_model_pred:
    
    beta_0=pm.Normal('beta_0', 0, 16)
    beta_1=pm.Normal('beta_1', 0, 16)
    beta_2=pm.Normal('beta_2', 0, 16)
    beta_3=pm.Normal('beta_3', 0, 16)
    humidity = pm.Data("humidity", value = X_train['Humidity'], mutable = True)
    light = pm.Data("light", value = X_train['Light'], mutable = True)
    co2 = pm.Data("co2", value = X_train['CO2'], mutable = True)
    label = pm.Data("label", value = y_train, mutable = True)
    observed=pm.Bernoulli("occupancy", pm.math.sigmoid(beta_0 + beta_1 * humidity + beta_2 * light + beta_3 * co2), observed = label)
with logistic_model_pred:
    step = pm.BinaryMetropolis(vars = label)
    trace = pm.sample(step = step)

I’m trying to create a logistic regression model, and the ‘label’ is binary. To sample the posterior of coefficients, in this case \beta_0, \beta_1, \beta_2, \beta_3, I’m trying to use pm.BinaryMetropolis(), but it gives me an error

'NoneType' object has no attribute 'endswith'

Am I using this step function correctly?

label is not a Random Variable so you will not be able to sample it.