Run SMC in model with no free parameters (for BF calculation)

I was interested in running SMC sampling for a very simple model that has no free-RVs to estimate the marginal likelihood, but I cannot do it. I tried adding an isolated uniform variable as suggested in this previous topic, but I get the following error message:

UnusedInputError: theano.function was asked to create a function computing outputs given certain inputs, but the provided input variable at index 0 is not part of the computational graph needed to compute the outputs: inarray. To make this error into a warning, you can pass the parameter on_unused_input=‘warn’ to theano.function. To disable it completely, use on_unused_input=‘ignore’.

Any ideas how to overcome this (unless it is incompatible with SMC sampling of course)?

See https://docs.pymc.io/notebooks/SMC2_gaussians.html
What you need to do:

  1. write down your likelihood function similar to two_gaussians in the doc
  2. initialized a Uniform distribution X, ideally you want to use a pm.Flat but you can not generate samples from it. Uniform would do (you can give a large upper/lower bound)
    now you can run SMC and it will converted to the likelihood function, which you can use the marginal_likelihood from the property.