Skip to content

Commit a674f2f

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
Fix downgrade-CI stale floors (ODE, SimpleOptimization, QuadDIRECT) + CCMO test detection (#1234)
Four independent fixes for red lanes on the master Downgrade Sublibraries run. Each reproduced locally with the real julia-actions/julia-downgrade-compat@v2 (Resolver.jl --min=@alldeps, julia=lts) merged-test-deps path, then verified with Pkg.test on Julia lts (1.10). - OptimizationODE: the OrdinaryDiffEq* solver subpackages had `1` floors whose registry compat permits a modern OrdinaryDiffEqCore but whose code does not (`get_fsalfirstlast`/`namify`/`alias_f`/`_process_verbose_param` skews). Raise the OrdinaryDiffEq* floors to `2`, SciMLBase to `3`, DiffEqBase to `7` so the downgrade resolves onto the modern, mutually-consistent stack (the same one the max resolution already uses). Verified: Core passes at the downgrade floor (Core 4.3.0 / SciMLBase 3.1.0 / DiffEqBase 7.0.0) and at max. - SimpleOptimization: `SimpleNonlinearSolve = "1, 2"` let the downgrade pick 1.8.0, which references `AbstractNonlinearTerminationMode` removed from the resolved DiffEqBase -> precompile UndefVarError. Raise floor to `2`. Verified. - OptimizationQuadDIRECT: no QuadDIRECT compat entry at all, so the downgrade floored to QuadDIRECT 0.0.1, whose split_insert! throws `AssertionError: xsplit[1] < xsplit[2] < xsplit[3]`. Add `QuadDIRECT = "0.1.2"`. Verified: downgrade resolves to 0.1.2 -> tests pass. - OptimizationMetaheuristics: the CCMO special-case in the multi-objective test used a stringified type-name comparison that no longer matches (Metaheuristics type-printing changed to fully-qualified names), so CCMO wrongly took the `use_initial=true` path and hit `type CCMO has no field N`. Failed at both downgrade and max. Detect CCMO by type (`alg.parameters isa Metaheuristics.CCMO`). Verified at both max and downgrade. Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e4d7212 commit a674f2f

4 files changed

Lines changed: 72 additions & 65 deletions

File tree

lib/OptimizationMetaheuristics/test/core_tests.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ Random.seed!(42)
145145
) -> prob_func(x)
146146
)
147147
prob = OptimizationProblem(multi_obj_fun, lb; lb = lb, ub = ub)
148-
if (alg_name == "Metaheuristics.Algorithm{CCMO{NSGA2}}")
148+
# CCMO wraps a base algorithm and has no `N` on its own
149+
# parameters, so the `use_initial` seeding path does not apply.
150+
# Detect it by type rather than a stringified type name, which
151+
# is fragile across Metaheuristics' type-printing changes.
152+
if alg.parameters isa Metaheuristics.CCMO
149153
sol = solve(prob, alg)
150154
else
151155
sol = solve(prob, alg; maxiters = 10000, use_initial = true)

lib/OptimizationODE/Project.toml

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,52 @@
11
name = "OptimizationODE"
22
uuid = "dfa73e59-e644-4d8a-bf84-188d7ecb34e4"
33
authors = ["Paras Puneet Singh <paras.puneet2204@gmail.com>"]
4-
version = "0.1.6"
4+
version = "0.1.7"
5+
56
[deps]
6-
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
7-
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
7+
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
88
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
99
OptimizationBase = "bca83a33-5cc9-4baa-983d-23429ab6bcbb"
10+
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
11+
OrdinaryDiffEqVerner = "79d7bb75-1356-48c1-b8c0-6832512096c2"
1012
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
13+
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
14+
SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f"
1115
OrdinaryDiffEqLowOrderRK = "1344f307-1e59-4825-a18e-ace9aa3fa4c6"
16+
OrdinaryDiffEqStabilizedRK = "358294b1-0aab-51c3-aafe-ad5ab194a2ad"
17+
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
1218
OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8"
1319
OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce"
14-
OrdinaryDiffEqStabilizedRK = "358294b1-0aab-51c3-aafe-ad5ab194a2ad"
15-
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
16-
OrdinaryDiffEqVerner = "79d7bb75-1356-48c1-b8c0-6832512096c2"
20+
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
1721
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
18-
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
19-
SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f"
20-
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
22+
23+
[extras]
24+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
25+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
26+
Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4"
27+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
2128

2229
[compat]
2330
Pkg = "1"
24-
SafeTestsets = "0.1"
25-
ADTypes = "1.18"
26-
DiffEqBase = "6.190.2, 7"
31+
NonlinearSolve = "4.11"
2732
ForwardDiff = "0.10, 1"
2833
OptimizationBase = "5"
29-
OrdinaryDiffEqLowOrderRK = "1, 2"
30-
OrdinaryDiffEqNonlinearSolve = "1, 2"
31-
OrdinaryDiffEqRosenbrock = "1, 2"
32-
OrdinaryDiffEqStabilizedRK = "1, 2"
33-
OrdinaryDiffEqTsit5 = "1.2.0, 2"
34-
OrdinaryDiffEqVerner = "1, 2"
35-
NonlinearSolve = "4.11"
36-
Reexport = "1"
37-
SciMLBase = "2.122.1, 3"
34+
OrdinaryDiffEqTsit5 = "2"
35+
OrdinaryDiffEqVerner = "2"
36+
SciMLBase = "3"
3837
SteadyStateDiffEq = "2.5"
38+
OrdinaryDiffEqLowOrderRK = "2"
39+
OrdinaryDiffEqStabilizedRK = "2"
3940
julia = "1.10"
40-
41-
[sources]
42-
OptimizationBase = {path = "../OptimizationBase"}
43-
44-
[extras]
45-
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
46-
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
47-
Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4"
48-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
41+
ADTypes = "1.18"
42+
OrdinaryDiffEqNonlinearSolve = "2"
43+
OrdinaryDiffEqRosenbrock = "2"
44+
DiffEqBase = "7"
45+
SafeTestsets = "0.1"
46+
Reexport = "1"
4947

5048
[targets]
5149
test = ["Sundials", "Test", "SafeTestsets", "Pkg"]
50+
51+
[sources.OptimizationBase]
52+
path = "../OptimizationBase"
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
name = "OptimizationQuadDIRECT"
22
uuid = "842ac81e-713d-465f-80f7-84eddaced298"
33
authors = ["Vaibhav Dixit <vaibhavyashdixit@gmail.com> and contributors"]
4-
version = "0.3.5"
4+
version = "0.3.6"
5+
56
[deps]
67
OptimizationBase = "bca83a33-5cc9-4baa-983d-23429ab6bcbb"
78
QuadDIRECT = "dae52e8d-d666-5120-a592-9e15c33b8d7a"
89
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
910
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1011

1112
[extras]
12-
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
1313
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1414
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
15+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
1516

1617
[compat]
1718
Pkg = "1"
18-
SafeTestsets = "0.1"
1919
julia = "1.10"
2020
OptimizationBase = "5"
21+
QuadDIRECT = "0.1.2"
2122
SciMLBase = "2.58, 3"
23+
SafeTestsets = "0.1"
2224
Reexport = "1.2"
2325

24-
[sources]
25-
OptimizationBase = {path = "../OptimizationBase"}
26-
2726
[targets]
2827
test = ["Pkg", "Test", "SafeTestsets"]
28+
29+
[sources.OptimizationBase]
30+
path = "../OptimizationBase"
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
name = "SimpleOptimization"
2+
version = "1.2.2"
23
uuid = "510db2f7-4254-4e34-bbda-04240c91ca8f"
34
authors = ["Utkarsh <rajpututkarsh530@gmail.com> and contributors"]
4-
version = "1.2.1"
55

6-
[deps]
7-
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
8-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
9-
OptimizationBase = "bca83a33-5cc9-4baa-983d-23429ab6bcbb"
10-
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
11-
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
12-
SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7"
13-
14-
[weakdeps]
15-
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
16-
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
17-
18-
[sources]
19-
OptimizationBase = {path = "../OptimizationBase"}
20-
21-
[extensions]
22-
SimpleOptimizationEnzymeExt = "Enzyme"
23-
SimpleOptimizationForwardDiffExt = "ForwardDiff"
6+
[targets]
7+
test = ["Test", "ForwardDiff", "SafeTestsets", "Pkg"]
248

259
[compat]
10+
SimpleNonlinearSolve = "2"
2611
Pkg = "1"
27-
SafeTestsets = "0.1"
28-
ADTypes = "1"
29-
Enzyme = "0.13"
12+
julia = "1.10"
3013
ForwardDiff = "0.10, 1"
14+
ADTypes = "1"
3115
OptimizationBase = "5"
32-
Reexport = "1.2"
3316
SciMLBase = "2.122.1, 3"
34-
SimpleNonlinearSolve = "1, 2"
35-
julia = "1.10"
17+
SafeTestsets = "0.1"
18+
Enzyme = "0.13"
19+
Reexport = "1.2"
20+
21+
[weakdeps]
22+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
23+
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
24+
25+
[deps]
26+
OptimizationBase = "bca83a33-5cc9-4baa-983d-23429ab6bcbb"
27+
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
28+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
29+
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
30+
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
31+
SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7"
3632

3733
[extras]
3834
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
39-
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
4035
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
4136
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
37+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
4238

43-
[targets]
44-
test = ["Test", "ForwardDiff", "SafeTestsets", "Pkg"]
39+
[sources.OptimizationBase]
40+
path = "../OptimizationBase"
41+
42+
[extensions]
43+
SimpleOptimizationEnzymeExt = "Enzyme"
44+
SimpleOptimizationForwardDiffExt = "ForwardDiff"

0 commit comments

Comments
 (0)