Skip to content

Commit

Permalink
fix test on names in likelihood components
Browse files Browse the repository at this point in the history
to work with literal models
  • Loading branch information
bgctw committed Sep 26, 2024
1 parent 7e990f0 commit 8706f68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/pointwise_logdensities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

# Compute the pointwise loglikelihoods.
lls = pointwise_loglikelihoods(model, vi)
@test [:x] == unique(DynamicPPL.getsym.(keys(lls)))
if isempty(lls)
# One of the models with literal observations, so we'll set this to 0 for subsequent comparisons.
loglikelihood_true = 0.0
else
@test [:x] == unique(DynamicPPL.getsym.(keys(lls)))
loglikelihood_sum = sum(sum, values(lls))
@test loglikelihood_sum loglikelihood_true
end
Expand Down

0 comments on commit 8706f68

Please sign in to comment.