Repository navigation
Add geometric and projected Armijo line searches - #106
Merged
ChrisRackauckas merged 3 commits intoSep 13, 2026
Merged
ChrisRackauckas merged 3 commits into
ChrisRackauckas merged 3 commits into
Conversation
Share merit evaluation, trial buffers, contraction, and sufficient-decrease handling between ordinary Armijo and box-projected searches. Expose cached trial results for solver reuse and document both published rules. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.154.0 Agent-Model: gpt-6-astra Agent-Session: local transcript /home/crackauc/.codex/sessions/2026/09/12/rollout-2026-09-12T04-30-15-01a094bd-179a-7972-97ec-36badb9448cd.jsonl
Round cached bounds inward to the state element type. Float32 trials must not round outside a Float64 bound before residual evaluation. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.154.0 Agent-Model: gpt-6-astra Agent-Session: local transcript /home/crackauc/.codex/sessions/2026/09/12/rollout-2026-09-12T04-30-15-01a094bd-179a-7972-97ec-36badb9448cd.jsonl
This was referenced Sep 13, 2026
| name = "LineSearch" | ||
| uuid = "87fe0de2-c867-4266-b59a-2f0a94fc965b" | ||
| version = "0.1.17" | ||
| version = "0.2.0" |
ChrisRackauckas
marked this pull request as ready for review
September 13, 2026 09:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
ArmijoLineSearch(fixed-factor backtracking) andProjectedBackTracking(Armijo along a box-projection arc). They share one search loop and the existing residual/objective merit evaluator;get_trialexposes the cached projected point and residual so outer solvers can accept a trial without another function evaluation. Existing algorithm defaults are unchanged.The ordinary method follows Armijo (1966); the projected rule follows Bertsekas (1976). The projected condition uses
dot(gradient, trial - u), including after multiple bound hits. It requires the caller's merit gradient, avoiding an extra Jacobian or derivative operator. Both names andget_trialare documented in the rendered API. These compatible additions ship as 0.1.18; no dependencies were added.Verification (all commands exited 0):
Runic, typos over changed files, and
git diff --checkpassed. Tests cover scalar, static, matrix and in-place states; JLArrays without scalar indexing; supplied/analytic/AD derivatives; finite evaluation limits; rejection of nonfinite merit; projection-specific sufficient decrease; fixed/one-sided bounds; and parameter reinitialization. A first docs attempt received HTTP 429 from GitHub's ColPrac link; an unchanged retry passed with link checking enabled. The LTS run used a separate local environment to avoid reusing a Julia 1.13 stdlib manifest.Actual CUDA/ROCm hardware and external downstream packages were not tested locally. These are sufficient-decrease methods, not Wolfe-curvature searches; convergence of a projected search with a general supplied direction depends on the outer method.
This supplies the core API needed to remove NonlinearSolve's local bounded Armijo loop, following SciML/NonlinearSolve.jl#1254 and SciML/NonlinearSolve.jl#1263.
The mixed-precision regression was also checked before and after the inward-rounding fix. With 6823a44 and the new test in place, the same
GROUP=Corecommand exited 1:A Float32 trial at a Float64 upper bound of
0.1had returnedSuccessdespitetrial > ub; the symmetric lower-bound case also failed. Both tests keep domain assertions inside the residual. With the fix, the full Core runs above exit 0, including all 191 Armijo assertions. Bounds are rounded inward once during cache initialization, preserving state types and feasibility.Ignore this draft until reviewed by @ChrisRackauckas.
🤖 Generated with Codex CLI 0.154.0 (model: gpt-6-astra). Session: local transcript
/home/crackauc/.codex/sessions/2026/09/12/rollout-2026-09-12T04-30-15-01a094bd-179a-7972-97ec-36badb9448cd.jsonl.