Skip to content

Commit

Permalink
adding default values for verbose option to custom BFGS solvers
Browse files Browse the repository at this point in the history
  • Loading branch information
Johanna Haffner committed Dec 7, 2024
1 parent 37ba70a commit 207f64a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class BFGSDampedNewton(optx.AbstractBFGS):
use_inverse: bool = False
search: optx.AbstractSearch = optx.ClassicalTrustRegion()
descent: optx.AbstractDescent = optx.DampedNewtonDescent()
verbose: frozenset[str] = frozenset()


class BFGSIndirectDampedNewton(optx.AbstractBFGS):
Expand All @@ -131,6 +132,7 @@ class BFGSIndirectDampedNewton(optx.AbstractBFGS):
use_inverse: bool = False
search: optx.AbstractSearch = optx.ClassicalTrustRegion()
descent: optx.AbstractDescent = optx.IndirectDampedNewtonDescent()
verbose: frozenset[str] = frozenset()


class BFGSDogleg(optx.AbstractBFGS):
Expand All @@ -142,6 +144,7 @@ class BFGSDogleg(optx.AbstractBFGS):
use_inverse: bool = False
search: optx.AbstractSearch = optx.ClassicalTrustRegion()
descent: optx.AbstractDescent = optx.DoglegDescent(linear_solver=lx.SVD())
verbose: frozenset[str] = frozenset()


class BFGSBacktracking(optx.AbstractBFGS):
Expand All @@ -153,6 +156,7 @@ class BFGSBacktracking(optx.AbstractBFGS):
use_inverse: bool = False
search: optx.AbstractSearch = optx.BacktrackingArmijo()
descent: optx.AbstractDescent = optx.NewtonDescent()
verbose: frozenset[str] = frozenset()


class BFGSTrustRegion(optx.AbstractBFGS):
Expand All @@ -164,6 +168,7 @@ class BFGSTrustRegion(optx.AbstractBFGS):
use_inverse: bool = False
search: optx.AbstractSearch = optx.LinearTrustRegion()
descent: optx.AbstractDescent = optx.NewtonDescent()
verbose: frozenset[str] = frozenset()


atol = rtol = 1e-8
Expand Down

0 comments on commit 207f64a

Please sign in to comment.