-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inexact error when computing loglikelihoods in models with conditionals - thread safety issue? #684
Comments
btw, i have confirmed on my M1 Mac that the likelihood computation for some Turing models is not threadsafe. I haven't figured out what about the model makes it not threadsafe. |
A slimmer MWE: using Turing
@model function f(x)
ns ~ filldist(Normal(0, 2.0), 3)
m ~ Uniform(0, 1)
x ~ Normal(m, 1)
end
model = f(1)
chain = sample(model, NUTS(), MCMCThreads(), 10, 4);
# all of these error with > 1 thread
loglikelihood(model, chain)
logprior(model, chain)
logjoint(model, chain) It has something to do with the fact that |
This should be fixed in the v0.28.5 release. Thanks for reporting @jerlich! |
I am trying to fit some Mixed Multinomial models. The models sample fine, but when computing the loglikelihood, i get an inexact error.
MWE:
I have tried to simplify the example, but in my simpler models i don't get the error.
When i run with only 1 thread i don't get the error.
I have put debug statements in the the model and the error happens after evaluating the model once (e.g. the first call to Multinomial on the second model evaluation generates the error).
versioninfo():
package info:
The text was updated successfully, but these errors were encountered: