Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add COBYQA optimizer #153

Open
wants to merge 27 commits into
base: dev
Choose a base branch
from
Open

Add COBYQA optimizer #153

wants to merge 27 commits into from

Conversation

schmoelder
Copy link
Contributor

@schmoelder schmoelder commented Jun 29, 2024

This PR adds the COBYQA optimizer which was recently added to SciPy, in v1.14.

To do

  • Update parameters
  • Upstream issue: "ValueError: x0 is infeasible with respect to some inequality constraint even though it is within bounds." (see #155)
  • Add switch for callback methods depending on selected method (see below)

Open question

This PR also updates the callback function for scipy optimizers. I was hoping that this would include the current best point instead of simply the latest point. This would remove the need to determine the optimal points ourselves using the ParetoFront class. However, this is not how it's implemented in COBYQA (see here).

Note, this interface is not supported by COBYLA and SLSQP, so these optimizers would have to be removed from CADET-Process when using the newer interface. Since COBYQA can replace COBYLA, I don't mind it going but SLSQP might be handy to keep around. So should we revert these changes (for now)?

Edit: Instead of removing COBYLA and SLSQP, provide both interfaces and switch depending on the selected method.

schmoelder and others added 27 commits June 25, 2024 14:36
Co-authored-by: daklauss <d.klauss@fz-juelich.de>
Changed comparison from `>=` to `>` for constraint violation to
correctly handle edge cases.
Plotting figures creates a major overhead during optimization. With this
option set to `None` by default, only the final results are plotted.
This has been implemented, hoping to address issues with COBYLA. Maybe
we don't really need this once precision is enabled?
…face

SLSQP and COBYLA currently do not support scipy's new callback
interface.
@schmoelder schmoelder changed the base branch from dev to optimizer_improvements June 29, 2024 12:04
@schmoelder schmoelder force-pushed the optimizer_improvements branch 3 times, most recently from db2a9ee to 4062efa Compare August 6, 2024 11:45
Base automatically changed from optimizer_improvements to dev August 6, 2024 11:53
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.

1 participant