-
Notifications
You must be signed in to change notification settings - Fork 32
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
InexactError with loglikelihood(model, chain)
on multiple threads when models have parameters of different types
#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! |
Reopening because this was fixed in 0.28 but the fix hasn't been successfully ported to newer versions. See #686 |
loglikelihood(model, chain)
on multiple threads when models have parameters of different types
* Default float type to float(Real), not Real (#685) * Default float type to float(Real), not Real Closes #684 * Trigger CI on backport branches/PRs * Add integration test for #684 * Bump Turing version to 0.34 in test subfolder * Bump minimum Julia version to 1.10 * Bump patch version * Bump patch again
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: