Skip to content

Commit

Permalink
Update to SciMLSensitivity (#70)
Browse files Browse the repository at this point in the history
* up DEsens

* add more AD tests

* rm Nabla
  • Loading branch information
prbzrg authored Jun 28, 2022
1 parent 41ac7a7 commit 96d6f2f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
ComputationalResources = "ed09eef8-17a6-5b46-8889-db040fac31e3"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DiffEqSensitivity = "41bf760c-e81c-5289-8e54-58b1f1f8abe2"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DistributionsAD = "ced4e74d-a319-5a8a-b0ac-84af2272839c"
Expand All @@ -29,6 +28,7 @@ OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1"
ScientificTypes = "321657f4-b219-11e9-178b-2701a2544e81"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
Expand All @@ -38,7 +38,6 @@ Adapt = "3.3"
CUDA = "3.7"
ComputationalResources = "0.3"
DataFrames = "1.2"
DiffEqSensitivity = "6.69"
DifferentialEquations = "7.0"
Distributions = "0.25"
DistributionsAD = "0.6"
Expand All @@ -57,6 +56,7 @@ OptimizationOptimJL = "0.1"
OptimizationOptimisers = "0.1"
OrdinaryDiffEq = "6.6"
SciMLBase = "1.27"
SciMLSensitivity = "7.0"
ScientificTypes = "3.0"
Zygote = "0.6"
julia = "1.6"
2 changes: 1 addition & 1 deletion src/ICNF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module ICNF
CUDA,
ComputationalResources,
DataFrames,
DiffEqSensitivity,
DifferentialEquations,
Distributions,
DistributionsAD,
Expand All @@ -24,6 +23,7 @@ module ICNF
OptimizationOptimisers,
OrdinaryDiffEq,
SciMLBase,
SciMLSensitivity,
ScientificTypes,
Zygote,
LinearAlgebra,
Expand Down
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
Yota = "cd998857-8626-517d-b929-70ad188a48f0"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ using
SciMLBase,
Test,
Tracker,
Yota,
Zygote

CUDA.allowscalar() do
Expand Down
4 changes: 4 additions & 0 deletions test/smoke_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
@test !isnothing(FiniteDiff.finite_difference_jacobian(diff_loss, icnf.p))
# @test !isnothing(FiniteDiff.finite_difference_hessian(diff_loss, icnf.p))

@test !isnothing(Yota.grad(diff_loss, icnf.p))

d = ICNFDist(icnf)

@test !isnothing(logpdf(d, r))
Expand Down Expand Up @@ -223,6 +225,8 @@
@test !isnothing(FiniteDiff.finite_difference_jacobian(diff_loss, icnf.p))
# @test !isnothing(FiniteDiff.finite_difference_hessian(diff_loss, icnf.p))

@test !isnothing(Yota.grad(diff_loss, icnf.p))

d = CondICNFDist(icnf, r2)

@test !isnothing(logpdf(d, r))
Expand Down

0 comments on commit 96d6f2f

Please sign in to comment.