Skip to content

PyData Sprint Meta Issue: Check and Polish Optimizers #583

Open

Description

@janosg

Background

Optimagic wraps a lot of optimizers. The complete list is here. Many of these algorithms have been added to optimagic years ago and not touched since. If the packages we wrap add additional tuning parameters, stopping criteria or support for bounds, we might not support them yet. Moreover, if a package added new algorithms we might not be aware of them at all.

Action

Please help us to check the optimizers wrapped in optimagic to see if we are missing out on any new developments.

Steps to check an algorithm

While doing these steps, please check the corresponding boxes in the list below to track your progress and avoid duplicated work.

  1. Read and run our optimization tutorial to get familiar with optimagic.
  2. Read How to add an optimizer to understand how optimization algorithms are added to optimagic.
  3. Pick one of the algorithms from the list and create a sub-issue to this issue called "Polish ALGO_NAME". Answer the following questions in the issue description
    • Does the algorithm have a complete, correct and useful documentation. You can see the documentation of each algorithm when you expand the dropdown box here. Complete means that all the questions listed here are answered.
    • Does the algorithm have any parameters we do not support. Examples can be stopping criteria, convergence criteria, tuning parameters, gradients or hessians, bounds, linear constraints or nonlinear constraints.
  4. If you identified any problems, create a Pull Request to solve them. Before you start, read our contributor guidelines.

Algorithms checked

  • nag_dfols
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nag_pybobyqa
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_bobyqa
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_ccsaq
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_cobyla
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_crs2_lm
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_direct
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_esch
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_isres
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_lbfgsb
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_mma
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_newuoa
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_neldermead
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_praxis
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_slsqp
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_sbplx
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_tnewton
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • nlopt_var
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_bee_colony
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_cmaes
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_compass_search
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_de
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_de1220
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_gaco
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_gwo
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_ihs
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_mbh
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_pso
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_pso_gen
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_sade
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_sea
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_sga
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_simulated_annealing
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • pygmo_xnes
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_bfgs
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_basinhopping
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_brute
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_cobyla
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_conjugate_gradient
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_differential_evolution
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_direct
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_dual_annealing
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_lbfgsb
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_ls_dogbox
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_ls_lm
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_ls_trf
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_neldermead
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_newton_cg
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_powell
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_shgo
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_slsqp
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_truncated_newton
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • scipy_trust_constr
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • tao_pounders
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now
  • ipopt
    • Working on it
    • Issue created (if needed)
    • PR created (if needed)
    • Everything is perfect now

Activity

  1. added
    enhancement
    on Apr 22, 2025
  2. janosg commented on Nov 15, 2026

    @janosg
    MemberAuthor

    Bugs found while checking all algorithm docstrings for #690 that are not fixed yet:

    • bhhh steps along +H⁻¹g, so it moves uphill with consistent derivatives. This is addressed by the rewrite in Rewrite the BHHH algorithm #728. The option converence_gtol_abs is misspelled.
    • nag_dfols:
      • The "auto" fast-start method never switches to "trustregion".
      • The check that hard resets are at least as frequent as soft resets compares the soft value with itself.
      • noise_n_evals_per_point cannot be set: callables fail validation and ints fail in DFO-LS.
      • The fast-start option key is spelled "min_inital_points".
    • scipy_shgo: n_simplex_iterations has no effect, because optimagic always passes maxev and SciPy then ignores iters.
    • scipy_brute: n_fun_evals is the size of the grid array (number of parameters times number of grid points) and ignores the evaluations of the polishing step.
    • pygmo:
      • pygmo_compass_search is marked is_global=True.
      • pygmo_xnes crashes with initial_search_share=None.
      • pygmo_sga does not accept the "gaussian" mutation strategy.
    • ipopt:
      • The default of acceptable_dual_inf_tol is 1e-10; Ipopt's default is 1e10.
      • All options are passed to Ipopt explicitly, which defeats Ipopt's logic for unset options. For example, mehrotra_algorithm cannot be used on its own and mu_max_fact has no effect.
    • tao_pounders:
      • Fails with petsc4py 3.26, because TAO.setInitial was removed (setSolution replaces it).
      • Reports the number of iterations as n_fun_evals.
    • NLopt: nlopt.RoundoffLimited is not caught, so minimize raises instead of returning the result. Example: nlopt_newuoa on (x - 3) @ (x - 3) from [0, 0] with bounds [-1, 1].
    • neldermead_parallel: with adaptive=True, the shrink step uses 1 − τ instead of τ (identical for the default τ = 0.5).
    • General: bounds passed to an algorithm with supports_bounds=False (e.g. scipy_bfgs) are silently ignored; the solution can violate them without an error or warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions