Skip to content

Commit

Permalink
Bump Optimization to v4, and related packages accordingly (#2354)
Browse files Browse the repository at this point in the history
* Reapply "Bump Optimization to v4, and related packages accordingly (#2327)" (#2343)

This reverts commit 3c91eec.

* Unmark Mooncake as broken on Optimization v4

---------

Co-authored-by: Markus Hauru <[email protected]>
Co-authored-by: Hong Ge <[email protected]>
  • Loading branch information
3 people authored Oct 24, 2024
1 parent f388e61 commit 08331c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ LogDensityProblemsAD = "1.7.0"
MCMCChains = "5, 6"
NamedArrays = "0.9, 0.10"
Optim = "1"
Optimization = "3"
OptimizationOptimJL = "0.1, 0.2, 0.3"
Optimization = "3, 4"
OptimizationOptimJL = "0.1, 0.2, 0.3, 0.4"
OrderedCollections = "1"
Printf = "1"
Random = "1"
Expand Down
8 changes: 4 additions & 4 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ MCMCChains = "5, 6"
Mooncake = "0.4.19"
NamedArrays = "0.9.4, 0.10"
Optim = "1"
Optimization = "3"
OptimizationBBO = "0.1, 0.2, 0.3"
OptimizationNLopt = "0.1, 0.2"
OptimizationOptimJL = "0.1, 0.2, 0.3"
Optimization = "3, 4"
OptimizationBBO = "0.1, 0.2, 0.3, 0.4"
OptimizationNLopt = "0.1, 0.2, 0.3"
OptimizationOptimJL = "0.1, 0.2, 0.3, 0.4"
PDMats = "0.10, 0.11"
Pkg = "1"
Random = "1"
Expand Down
9 changes: 1 addition & 8 deletions test/optimisation/Optimisation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -624,14 +624,7 @@ using Turing
m = DynamicPPL.contextualize(
gdemo_default, ADUtils.ADTypeCheckContext(adbackend, gdemo_default.context)
)
if adbackend isa AutoMooncake
# Optimization.jl does not support Mooncake as an AD backend, see
# https://docs.sciml.ai/Optimization/stable/API/ad/#ad
# If it ever does, then we should just run them to make sure they don't error
err_msg = "The passed automatic differentiation backend choice is not available"
@test_throws err_msg maximum_likelihood(m; adtype=adbackend)
@test_throws err_msg maximum_a_posteriori(m; adtype=adbackend)
elseif adbackend isa AutoForwardDiff
if adbackend isa AutoForwardDiff
# TODO: Figure out why this is happening.
# https://github.com/TuringLang/Turing.jl/issues/2369
@test_throws DivideError maximum_likelihood(m; adtype=adbackend)
Expand Down

0 comments on commit 08331c5

Please sign in to comment.