Skip to content

Commit

Permalink
Resolve ADTypeCheckContext method ambiguity (#2299)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhauru authored Aug 9, 2024
1 parent 803d2f5 commit 07cc40b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/test_utils/ad_utils.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module ADUtils

using ForwardDiff: ForwardDiff
using Random: Random
using ReverseDiff: ReverseDiff
using Test: Test
using Tracker: Tracker
Expand Down Expand Up @@ -174,7 +175,9 @@ function DynamicPPL.tilde_assume(context::ADTypeCheckContext, right, vn, vi)
return value, logp, vi
end

function DynamicPPL.tilde_assume(rng, context::ADTypeCheckContext, sampler, right, vn, vi)
function DynamicPPL.tilde_assume(
rng::Random.AbstractRNG, context::ADTypeCheckContext, sampler, right, vn, vi
)
value, logp, vi = DynamicPPL.tilde_assume(
rng, DynamicPPL.childcontext(context), sampler, right, vn, vi
)
Expand Down Expand Up @@ -205,7 +208,7 @@ function DynamicPPL.dot_tilde_assume(context::ADTypeCheckContext, right, left, v
end

function DynamicPPL.dot_tilde_assume(
rng, context::ADTypeCheckContext, sampler, right, left, vn, vi
rng::Random.AbstractRNG, context::ADTypeCheckContext, sampler, right, left, vn, vi
)
value, logp, vi = DynamicPPL.dot_tilde_assume(
rng, DynamicPPL.childcontext(context), sampler, right, left, vn, vi
Expand Down

0 comments on commit 07cc40b

Please sign in to comment.