Skip to content

Fomo generalized#353

Open
d-monnet wants to merge 42 commits into
JuliaSmoothOptimizers:mainfrom
d-monnet:fomo-generalized
Open

Fomo generalized#353
d-monnet wants to merge 42 commits into
JuliaSmoothOptimizers:mainfrom
d-monnet:fomo-generalized

Conversation

@d-monnet

Copy link
Copy Markdown
Contributor

Add Nesterov's Heavy-Ball and non-linear conjugate gradient (Polak-Ribière and Fletcher-Reeves) momentum strategies.

Comment thread src/fomo.jl Outdated
Comment thread src/fomo.jl

solver.α = init_alpha(norm_∇fk, step_backend)


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment thread src/fomo.jl

grad!(nlp, x, g)
norm_∇fk = norm(g)
d .= -g

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this allocate ? Should it be d .= .-g ?

Comment thread src/fomo.jl
Comment on lines +648 to +652
"""
# function update_kappa(αk::T, αk₋::T, ::ia_momentum) where {T}
# 1
# end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""
# function update_kappa(αk::T, αk₋::T, ::ia_momentum) where {T}
# 1
# end
"""

@d-monnet

d-monnet commented Feb 16, 2026

Copy link
Copy Markdown
Contributor Author

Looks like the multiprec test fails because kkt_checker function times out.
Here is the test output :

fomo_tr_ia_momentum : nonmonotone configuration |   46     2     48    30.6s
      Problem (x₁ - 1)² + 4(x₂ - 1)²                |    4            4     0.0s
      Problem Diagonal quadratic                    |    4            4     0.0s
      Problem Tridiagonal quadratic                 |    4            4     0.0s
      Problem Rosenbrock                            |    4            4     0.0s
      Problem Extended Rosenbrock                   |    4            4     0.0s
      Precision Float16 for ptype unc               |    7            7     0.0s
      Precision Float32 for ptype unc               |    7            7     0.0s
      Precision Float64 for ptype unc               |    7            7     0.0s
      Precision BigFloat for ptype unc              |    5     2      7    30.0s

Test can be reproduced as

T = BFloat16
f(x) = (x[1] - 1)^2 + 4 * (x[2] - x[1]^2)^2
nlp = ADNLPModel(f, x0)
ϵ = eps(T)^T(1 / 4)
ng0 = norm(grad(nlp, nlp.meta.x0))
stats = fomo(nlp,momentum_backend = ia_momentum(), step_backend = r2_step()) # this doesn't time out

@test eltype(stats.solution) == T
@test stats.objective isa T
@test stats.dual_feas isa T
@test stats.primal_feas isa T
primal, dual = kkt_checker(nlp, stats.solution) # this seems to timeout, causing the 2 next tests to fail
@test all(abs.(dual) .< ϵ * ng0 + ϵ) # this fails
@test all(abs.(primal) .< ϵ * ng0 + ϵ) # this fails
@test stats.dual_feas < ϵ * ng0 + ϵ

Problem is solved with first order status on my machine, but kkt_checker times out, hence primal and dual variables are not defined causing two tests to fail.

d-monnet and others added 9 commits February 17, 2026 12:13
* Update LICENSE.md to reflect MPL version 2.0
* Add GPU test for TRUNK, TRUNK-NLS and FOMO

* fix typo
* Add more information to the documentation

* Delete 'How to cite' section from index.md

Removed citation section from the documentation.

* Update optimization problem notation in documentation

Replaced LaTeX equation with plain text representation.

* Fix formatting in documentation for JSOSolvers

* add more

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix heading format in examples.md

* Update docs/src/index.md

* Update docs/src/index.md

* Enhance documentation with function and algorithm details

Added explanation of function properties and optimization methods.

* Add header for doc in readme

* Add unit test instructions for JSOSolvers package

Added instructions for running unit tests for the JSOSolvers package.

* Add unit test instructions to README

Added instructions for running unit tests.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
tmigot and others added 14 commits June 26, 2026 14:20
…s#334)

* Add deps and tests comment

* Update docs/src/index.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add-more-on-tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Improve doc

* Update src/tronls.jl

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
JOSS release for paper submission.

This release corresponds to the version reviewed in the JOSS submission.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants