when I try to run the DynamicNUTS example from the documentation upon loading the libraries (and having installed current versions) the below issues occur:
Warning: Error requiring LogDensityProblems from Turing:
UndefVarError: AbstractLogDensityProblem not defined
as well as:
Warning: Error requiring DynamicHMC from Turing:
UndefVarError: NUTS_init_tune_mcmc not defined
This occured on two separate computers (both running windows 10) on a fresh install of julia.
Am I doing something wrong or did something break?
Tamas updated DynamicHMC a little while ago, and it broke Turing’s interface to it. I thought we had prevented these kinds of errors, though – could you print out the results of ] status so I can see the version of everything?
As a side note, Turing uses the excellent AdvancedHMC as it’s default HMC backend. It provides NUTS, HMCDA, and HMC samplers, which you can use via
thanks for the quick reply.
I didn’t know about the AdvancedHMC stuff, I think that wasn’t there when I last looked at Turing. I’ll give it a shot right away
@Tamas_Papp would you be willing to have a look at the current inference implemented between Turing and DynamicHMC? I’m sure you will be much fast than anyone from the Turing team to figure out what has to be done.
The same response I got 5 years ago should probably still apply: You could try using the NUTS sampler that comes with the Turing ecosystem instead of the one in DynamicHMC. So basically this should do the trick:
using Turing
@model function gdemo(x, y)
s² ~ InverseGamma(2, 3)
m ~ Normal(0, sqrt(s²))
x ~ Normal(m, sqrt(s²))
y ~ Normal(m, sqrt(s²))
end
chn = sample(gdemo(1.5, 2.0), NUTS(), 2000)
Or is there a specific reason you want to use the one in DynamicHMC?