Skip to content

Commit

Permalink
Mark ReverseDiff for filldist(::Skellam, n) as broken
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion committed Nov 19, 2020
1 parent 5f6f98c commit 6599783
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions test/ad/distributions.jl
Expand Up @@ -408,6 +408,11 @@

# Broken distributions
d.f(d.θ...) isa Union{VonMises,TriangularDist} && continue

# Skellam only fails in these tests with ReverseDiff
# Ref: https://github.com/TuringLang/DistributionsAD.jl/issues/126
filldist_broken = d.f(d.θ...) isa Skellam ? (:ReverseDiff,) : d.broken
arraydist_broken = d.broken

# Create `filldist` distribution
f_filldist =...,) -> filldist(d.f...), n)
Expand All @@ -429,10 +434,22 @@

# Test AD
test_ad(
DistSpec(Symbol(:filldist, " (", d.name, ", $sz)"), f_filldist, d.θ, x)
DistSpec(
Symbol(:filldist, " (", d.name, ", $sz)"),
f_filldist,
d.θ,
x;
broken=filldist_broken,
)
)
test_ad(
DistSpec(Symbol(:arraydist, " (", d.name, ", $sz)"), f_arraydist, d.θ, x)
DistSpec(
Symbol(:arraydist, " (", d.name, ", $sz)"),
f_arraydist,
d.θ,
x;
broken=arraydist_broken,
)
)
end
end
Expand Down

0 comments on commit 6599783

Please sign in to comment.