Skip to content

Commit 08331c5

Browse files
penelopeysmmhauruyebai
authored
Bump Optimization to v4, and related packages accordingly (#2354)
* 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]>
1 parent f388e61 commit 08331c5

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ LogDensityProblemsAD = "1.7.0"
7373
MCMCChains = "5, 6"
7474
NamedArrays = "0.9, 0.10"
7575
Optim = "1"
76-
Optimization = "3"
77-
OptimizationOptimJL = "0.1, 0.2, 0.3"
76+
Optimization = "3, 4"
77+
OptimizationOptimJL = "0.1, 0.2, 0.3, 0.4"
7878
OrderedCollections = "1"
7979
Printf = "1"
8080
Random = "1"

test/Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ MCMCChains = "5, 6"
5656
Mooncake = "0.4.19"
5757
NamedArrays = "0.9.4, 0.10"
5858
Optim = "1"
59-
Optimization = "3"
60-
OptimizationBBO = "0.1, 0.2, 0.3"
61-
OptimizationNLopt = "0.1, 0.2"
62-
OptimizationOptimJL = "0.1, 0.2, 0.3"
59+
Optimization = "3, 4"
60+
OptimizationBBO = "0.1, 0.2, 0.3, 0.4"
61+
OptimizationNLopt = "0.1, 0.2, 0.3"
62+
OptimizationOptimJL = "0.1, 0.2, 0.3, 0.4"
6363
PDMats = "0.10, 0.11"
6464
Pkg = "1"
6565
Random = "1"

test/optimisation/Optimisation.jl

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -624,14 +624,7 @@ using Turing
624624
m = DynamicPPL.contextualize(
625625
gdemo_default, ADUtils.ADTypeCheckContext(adbackend, gdemo_default.context)
626626
)
627-
if adbackend isa AutoMooncake
628-
# Optimization.jl does not support Mooncake as an AD backend, see
629-
# https://docs.sciml.ai/Optimization/stable/API/ad/#ad
630-
# If it ever does, then we should just run them to make sure they don't error
631-
err_msg = "The passed automatic differentiation backend choice is not available"
632-
@test_throws err_msg maximum_likelihood(m; adtype=adbackend)
633-
@test_throws err_msg maximum_a_posteriori(m; adtype=adbackend)
634-
elseif adbackend isa AutoForwardDiff
627+
if adbackend isa AutoForwardDiff
635628
# TODO: Figure out why this is happening.
636629
# https://github.com/TuringLang/Turing.jl/issues/2369
637630
@test_throws DivideError maximum_likelihood(m; adtype=adbackend)

0 commit comments

Comments
 (0)