Skip to content

Commit

Permalink
Added comment on a potential issue with _pointwise_tilde_assume
Browse files Browse the repository at this point in the history
  • Loading branch information
torfjelde committed Sep 23, 2024
1 parent 91a6907 commit 8bd2085
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pointwise_logdensities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ end
function _pointwise_tilde_assume(context, right, left, vns, vi)
# We need to drop the `vi` returned.
values_and_logps = broadcast(right, left, vns) do r, l, vn
# HACK(torfjelde): This drops the `vi` returned, which means the `vi` is not updated
# in case of immutable varinfos. But a) atm we're only using mutable varinfos for this,
# and b) even if the variables aren't stored in the vi correctly, we're not going to use
# this vi for anything downstream anyways, i.e. I don't see a case where this would matter
# for this particular use case.
val, logp, _ = tilde_assume(context, r, vn, vi)
return val, logp
end
Expand Down

0 comments on commit 8bd2085

Please sign in to comment.