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

CompatHelper: bump compat for "DistributionsAD" to "0.2" #1074

Merged
Merged
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ AbstractMCMC = "~0.1"
AdvancedHMC = "0.2.20"
Bijectors = "0.4.0, 0.5"
BinaryProvider = "0.5.6"
Distributions = "0.21.11, 0.22"
DistributionsAD = "0.1.2"
Distributions = "0.22"
DistributionsAD = "0.2"
DynamicPPL = "0.1.0"
FiniteDifferences = "0.9"
ForwardDiff = "0.10.3"
Libtask = "0.3.1"
LogDensityProblems = "^0.9, 0.10"
Expand Down
10 changes: 5 additions & 5 deletions test/core/ad.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ForwardDiff, Distributions, FiniteDifferences, Tracker, Random, LinearAlgebra, PDMats
using Turing: Turing, gradient_logp_reverse, invlink, link, SampleFromPrior
using DynamicPPL: getval
using Turing.Core: TuringMvNormal, TuringDiagNormal
using Turing.Core: TuringDenseMvNormal, TuringDiagMvNormal
using ForwardDiff: Dual
using StatsFuns: binomlogpdf, logsumexp
using Test, LinearAlgebra
Expand Down Expand Up @@ -107,8 +107,8 @@ _to_cov(B) = B * B' + Matrix(I, size(B)...)
B = randn(rng, N, N)
m, A = randn(rng, N), B' * B + I

# Generate from the TuringMvNormal
d, back = Tracker.forward(TuringMvNormal, m, A)
# Generate from the TuringDenseMvNormal
d, back = Tracker.forward(TuringDenseMvNormal, m, A)
x = Tracker.data(rand(d))

# Check that the logpdf agrees with MvNormal.
Expand All @@ -121,7 +121,7 @@ _to_cov(B) = B * B' + Matrix(I, size(B)...)
rng, N = MersenneTwister(123456), 11
m, σ = randn(rng, N), exp.(0.1 .* randn(rng, N)) .+ 1

d = TuringDiagNormal(m, σ)
d = TuringDiagMvNormal(m, σ)
x = rand(d)

# Check that the logpdf agrees with MvNormal.
Expand All @@ -132,7 +132,7 @@ _to_cov(B) = B * B' + Matrix(I, size(B)...)
end
@turing_testset "Tracker + MvNormal Interface" begin
# Note that we only test methods where the `MvNormal` ctor actually constructs
# a TuringMvNormal.
# a TuringDenseMvNormal.

rng, N = MersenneTwister(123456), 7
m, b, B, x = randn(rng, N), randn(rng, N), randn(rng, N, N), randn(rng, N)
Expand Down