T adam 2026 - #368
Draft
farhadrclass wants to merge 21 commits into
Draft
Conversation
Introduce a new unconstrained optimizer, `tadam`, with a full `TADAMSolver` implementation, configurable parameter set, trust-region step logic, momentum/RMS updates, and solver-specific stats (`avgβ1max`). Wire it into `JSOSolvers.jl` via `include("tadam.jl")`.
Also add a standalone `tadam_example` environment and test script that sets up a Rastrigin problem and compares TADAM against LBFGS for experimentation.
Move gradient evaluation and direction update to the start of each solver loop so the subproblem always uses a fresh direction, even on rejected steps. Dual residual stats are now updated every iteration, and redundant `d` recomputations in branch blocks were removed. The bias-correction denominator for `d` now uses `max(1, siter)` to avoid the `siter=0` edge case.
Refactors the TADAM iteration flow so step computation, acceptance, callback batch advancement, and next-direction preparation happen in a consistent order. Momentum/variance absorption now occurs only after accepted steps, and the next gradient/beta geometry is computed on the new batch after the callback. Rejected steps now reuse the current gradient/momentum and only recompute direction with a shrunk β1max. Also adds a ΔTk <= eps(T) guard to prevent Float32 underflow when computing ρk.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #368 +/- ##
===========================================
- Coverage 89.00% 76.19% -12.81%
===========================================
Files 7 8 +1
Lines 1200 1420 +220
===========================================
+ Hits 1068 1082 +14
- Misses 132 338 +206 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d-monnet
reviewed
Jul 24, 2026
| Analytically finds the largest τ ∈ [0,1] satisfying both gradient-related conditions. | ||
| """ | ||
| function find_tau(sc::V, s_infty::V, g::V, κ1::T, κ2::T) where {V, T} | ||
| w = s_infty .- sc |
Contributor
There was a problem hiding this comment.
there is memory allocation here, this is no good
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.
No description provided.