Skip to content
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

Resolve ADTypeCheckContext method ambiguity #2299

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading