Open
Conversation
c277ffe to
65d25b5
Compare
65d25b5 to
9e9c844
Compare
d011669 to
64805e7
Compare
37da646 to
9f5c583
Compare
Member
Author
|
@penelopeysm the turing test fails for reasons unrealted to enzyme, can you take a look? |
f2c5381 to
b2859dc
Compare
Contributor
|
I think this should fix it diff --git a/test/integration/Turing/runtests.jl b/test/integration/Turing/runtests.jl
index 72d4137d..da114da7 100644
--- a/test/integration/Turing/runtests.jl
+++ b/test/integration/Turing/runtests.jl
@@ -17,7 +17,13 @@ adtypes = (
@model function assume_normal()
a ~ Normal()
end
-dppl_lda = begin
+@model function dppl_lda(k, m, w, doc, alpha, beta)
+ theta ~ product_distribution(fill(Dirichlet(alpha), m))
+ phi ~ product_distribution(fill(Dirichlet(beta), k))
+ log_phi_dot_theta = log.(phi * theta)
+ @addlogprob! sum(log_phi_dot_theta[CartesianIndex.(w, doc)])
+end
+dppl_lda_model = begin
v = 100 # words
k = 5 # topics
m = 10 # number of docs
@@ -37,18 +43,12 @@ dppl_lda = begin
doc[idx + j] = i
end
end
- @model function dppl_lda(k, m, w, doc, alpha, beta)
- theta ~ product_distribution(fill(Dirichlet(alpha), m))
- phi ~ product_distribution(fill(Dirichlet(beta), k))
- log_phi_dot_theta = log.(phi * theta)
- @addlogprob! sum(log_phi_dot_theta[CartesianIndex.(w, doc)])
- end
- dppl_lda
+ dppl_lda(k, m, w, doc, alpha, beta)
end
MODELS = [
DynamicPPL.TestUtils.ALL_MODELS...,
assume_normal(),
- dppl_lda(k, m, w, doc, alpha, beta),
+ dppl_lda_model,
]
@testset "AD on logdensity" begin |
Member
Author
|
@penelopeysm can you open a PR to enzyme with your patch? ill rebase this atop that |
cf6bc8d to
db5a6c0
Compare
lets see what breaks
db5a6c0 to
e1d38ea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lets see what breaks