Skip to content

Nevergrad: OnePlusOne Optimiser addition #576

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion src/optimagic/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from optimagic.optimizers.ipopt import Ipopt
from optimagic.optimizers.nag_optimizers import NagDFOLS, NagPyBOBYQA
from optimagic.optimizers.neldermead import NelderMeadParallel
from optimagic.optimizers.nevergrad_optimizers import NevergradPSO
from optimagic.optimizers.nevergrad_optimizers import NevergradOnePlusOne, NevergradPSO
from optimagic.optimizers.nlopt_optimizers import (
NloptBOBYQA,
NloptCCSAQ,
Expand Down Expand Up @@ -207,6 +207,7 @@ class BoundedGradientFreeLocalNonlinearConstrainedScalarAlgorithms(AlgoSelection

@dataclass(frozen=True)
class BoundedGradientFreeLocalParallelScalarAlgorithms(AlgoSelection):
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
tranquilo: Type[Tranquilo] = Tranquilo


Expand Down Expand Up @@ -493,6 +494,7 @@ def Scalar(self) -> BoundedGradientFreeLocalNonlinearConstrainedScalarAlgorithms
@dataclass(frozen=True)
class BoundedGradientFreeLocalScalarAlgorithms(AlgoSelection):
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
nlopt_newuoa: Type[NloptNEWUOA] = NloptNEWUOA
Expand Down Expand Up @@ -527,6 +529,7 @@ def Parallel(self) -> BoundedGradientFreeLeastSquaresLocalParallelAlgorithms:

@dataclass(frozen=True)
class BoundedGradientFreeLocalParallelAlgorithms(AlgoSelection):
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
pounders: Type[Pounders] = Pounders
tranquilo: Type[Tranquilo] = Tranquilo
tranquilo_ls: Type[TranquiloLS] = TranquiloLS
Expand All @@ -553,6 +556,7 @@ def Bounded(self) -> BoundedGradientFreeLocalNonlinearConstrainedScalarAlgorithm
@dataclass(frozen=True)
class GradientFreeLocalParallelScalarAlgorithms(AlgoSelection):
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
tranquilo: Type[Tranquilo] = Tranquilo

@property
Expand Down Expand Up @@ -610,6 +614,7 @@ def Scalar(self) -> BoundedGradientFreeNonlinearConstrainedParallelScalarAlgorit

@dataclass(frozen=True)
class BoundedGradientFreeParallelScalarAlgorithms(AlgoSelection):
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
pygmo_gaco: Type[PygmoGaco] = PygmoGaco
pygmo_pso_gen: Type[PygmoPsoGen] = PygmoPsoGen
Expand Down Expand Up @@ -765,6 +770,7 @@ def GradientFree(

@dataclass(frozen=True)
class BoundedLocalParallelScalarAlgorithms(AlgoSelection):
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
tranquilo: Type[Tranquilo] = Tranquilo

@property
Expand Down Expand Up @@ -1167,6 +1173,7 @@ def Scalar(self) -> GlobalGradientFreeParallelScalarAlgorithms:
class BoundedGradientFreeLocalAlgorithms(AlgoSelection):
nag_dfols: Type[NagDFOLS] = NagDFOLS
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
nlopt_newuoa: Type[NloptNEWUOA] = NloptNEWUOA
Expand Down Expand Up @@ -1216,6 +1223,7 @@ def Scalar(self) -> GradientFreeLocalNonlinearConstrainedScalarAlgorithms:
class GradientFreeLocalScalarAlgorithms(AlgoSelection):
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
nlopt_newuoa: Type[NloptNEWUOA] = NloptNEWUOA
Expand Down Expand Up @@ -1261,6 +1269,7 @@ def Parallel(self) -> GradientFreeLeastSquaresLocalParallelAlgorithms:
@dataclass(frozen=True)
class GradientFreeLocalParallelAlgorithms(AlgoSelection):
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
pounders: Type[Pounders] = Pounders
tranquilo: Type[Tranquilo] = Tranquilo
tranquilo_ls: Type[TranquiloLS] = TranquiloLS
Expand Down Expand Up @@ -1306,6 +1315,7 @@ def Scalar(self) -> BoundedGradientFreeNonlinearConstrainedScalarAlgorithms:
@dataclass(frozen=True)
class BoundedGradientFreeScalarAlgorithms(AlgoSelection):
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
Expand Down Expand Up @@ -1378,6 +1388,7 @@ def Parallel(self) -> BoundedGradientFreeLeastSquaresParallelAlgorithms:

@dataclass(frozen=True)
class BoundedGradientFreeParallelAlgorithms(AlgoSelection):
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
pounders: Type[Pounders] = Pounders
pygmo_gaco: Type[PygmoGaco] = PygmoGaco
Expand Down Expand Up @@ -1460,6 +1471,7 @@ def Scalar(self) -> GradientFreeNonlinearConstrainedParallelScalarAlgorithms:
@dataclass(frozen=True)
class GradientFreeParallelScalarAlgorithms(AlgoSelection):
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
pygmo_gaco: Type[PygmoGaco] = PygmoGaco
pygmo_pso_gen: Type[PygmoPsoGen] = PygmoPsoGen
Expand Down Expand Up @@ -1698,6 +1710,7 @@ class BoundedLocalScalarAlgorithms(AlgoSelection):
iminuit_migrad: Type[IminuitMigrad] = IminuitMigrad
ipopt: Type[Ipopt] = Ipopt
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_ccsaq: Type[NloptCCSAQ] = NloptCCSAQ
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
Expand Down Expand Up @@ -1758,6 +1771,7 @@ def Parallel(self) -> BoundedLeastSquaresLocalParallelAlgorithms:

@dataclass(frozen=True)
class BoundedLocalParallelAlgorithms(AlgoSelection):
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
pounders: Type[Pounders] = Pounders
tranquilo: Type[Tranquilo] = Tranquilo
tranquilo_ls: Type[TranquiloLS] = TranquiloLS
Expand Down Expand Up @@ -1801,6 +1815,7 @@ def GradientFree(self) -> GradientFreeLocalNonlinearConstrainedScalarAlgorithms:
@dataclass(frozen=True)
class LocalParallelScalarAlgorithms(AlgoSelection):
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
tranquilo: Type[Tranquilo] = Tranquilo

@property
Expand Down Expand Up @@ -1882,6 +1897,7 @@ def Scalar(self) -> BoundedNonlinearConstrainedParallelScalarAlgorithms:

@dataclass(frozen=True)
class BoundedParallelScalarAlgorithms(AlgoSelection):
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
pygmo_gaco: Type[PygmoGaco] = PygmoGaco
pygmo_pso_gen: Type[PygmoPsoGen] = PygmoPsoGen
Expand Down Expand Up @@ -2190,6 +2206,7 @@ class GradientFreeLocalAlgorithms(AlgoSelection):
nag_dfols: Type[NagDFOLS] = NagDFOLS
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
nlopt_newuoa: Type[NloptNEWUOA] = NloptNEWUOA
Expand Down Expand Up @@ -2229,6 +2246,7 @@ def Scalar(self) -> GradientFreeLocalScalarAlgorithms:
class BoundedGradientFreeAlgorithms(AlgoSelection):
nag_dfols: Type[NagDFOLS] = NagDFOLS
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
Expand Down Expand Up @@ -2326,6 +2344,7 @@ def Scalar(self) -> GradientFreeNonlinearConstrainedScalarAlgorithms:
class GradientFreeScalarAlgorithms(AlgoSelection):
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
Expand Down Expand Up @@ -2407,6 +2426,7 @@ def Parallel(self) -> GradientFreeLeastSquaresParallelAlgorithms:
@dataclass(frozen=True)
class GradientFreeParallelAlgorithms(AlgoSelection):
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
pounders: Type[Pounders] = Pounders
pygmo_gaco: Type[PygmoGaco] = PygmoGaco
Expand Down Expand Up @@ -2614,6 +2634,7 @@ class BoundedLocalAlgorithms(AlgoSelection):
ipopt: Type[Ipopt] = Ipopt
nag_dfols: Type[NagDFOLS] = NagDFOLS
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_ccsaq: Type[NloptCCSAQ] = NloptCCSAQ
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
Expand Down Expand Up @@ -2697,6 +2718,7 @@ class LocalScalarAlgorithms(AlgoSelection):
ipopt: Type[Ipopt] = Ipopt
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_ccsaq: Type[NloptCCSAQ] = NloptCCSAQ
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
Expand Down Expand Up @@ -2781,6 +2803,7 @@ def GradientBased(self) -> GradientBasedLikelihoodLocalAlgorithms:
@dataclass(frozen=True)
class LocalParallelAlgorithms(AlgoSelection):
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
pounders: Type[Pounders] = Pounders
tranquilo: Type[Tranquilo] = Tranquilo
tranquilo_ls: Type[TranquiloLS] = TranquiloLS
Expand Down Expand Up @@ -2847,6 +2870,7 @@ class BoundedScalarAlgorithms(AlgoSelection):
iminuit_migrad: Type[IminuitMigrad] = IminuitMigrad
ipopt: Type[Ipopt] = Ipopt
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_ccsaq: Type[NloptCCSAQ] = NloptCCSAQ
Expand Down Expand Up @@ -2948,6 +2972,7 @@ def Parallel(self) -> BoundedLeastSquaresParallelAlgorithms:

@dataclass(frozen=True)
class BoundedParallelAlgorithms(AlgoSelection):
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
pounders: Type[Pounders] = Pounders
pygmo_gaco: Type[PygmoGaco] = PygmoGaco
Expand Down Expand Up @@ -3050,6 +3075,7 @@ def Scalar(self) -> NonlinearConstrainedParallelScalarAlgorithms:
@dataclass(frozen=True)
class ParallelScalarAlgorithms(AlgoSelection):
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
pygmo_gaco: Type[PygmoGaco] = PygmoGaco
pygmo_pso_gen: Type[PygmoPsoGen] = PygmoPsoGen
Expand Down Expand Up @@ -3158,6 +3184,7 @@ class GradientFreeAlgorithms(AlgoSelection):
nag_dfols: Type[NagDFOLS] = NagDFOLS
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
Expand Down Expand Up @@ -3293,6 +3320,7 @@ class LocalAlgorithms(AlgoSelection):
nag_dfols: Type[NagDFOLS] = NagDFOLS
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_ccsaq: Type[NloptCCSAQ] = NloptCCSAQ
nlopt_cobyla: Type[NloptCOBYLA] = NloptCOBYLA
Expand Down Expand Up @@ -3363,6 +3391,7 @@ class BoundedAlgorithms(AlgoSelection):
ipopt: Type[Ipopt] = Ipopt
nag_dfols: Type[NagDFOLS] = NagDFOLS
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_ccsaq: Type[NloptCCSAQ] = NloptCCSAQ
Expand Down Expand Up @@ -3500,6 +3529,7 @@ class ScalarAlgorithms(AlgoSelection):
ipopt: Type[Ipopt] = Ipopt
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_ccsaq: Type[NloptCCSAQ] = NloptCCSAQ
Expand Down Expand Up @@ -3629,6 +3659,7 @@ def Local(self) -> LikelihoodLocalAlgorithms:
@dataclass(frozen=True)
class ParallelAlgorithms(AlgoSelection):
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
pounders: Type[Pounders] = Pounders
pygmo_gaco: Type[PygmoGaco] = PygmoGaco
Expand Down Expand Up @@ -3678,6 +3709,7 @@ class Algorithms(AlgoSelection):
nag_dfols: Type[NagDFOLS] = NagDFOLS
nag_pybobyqa: Type[NagPyBOBYQA] = NagPyBOBYQA
neldermead_parallel: Type[NelderMeadParallel] = NelderMeadParallel
nevergrad_oneplusone: Type[NevergradOnePlusOne] = NevergradOnePlusOne
nevergrad_pso: Type[NevergradPSO] = NevergradPSO
nlopt_bobyqa: Type[NloptBOBYQA] = NloptBOBYQA
nlopt_ccsaq: Type[NloptCCSAQ] = NloptCCSAQ
Expand Down
Loading
Loading