From ac45792815c334db575317a1823a7fdb5bdabfa3 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 21 Nov 2023 16:40:19 +0100 Subject: [PATCH 1/3] Scatter search documentation / use local optimizer by default * Extended scatter search documentation * Changed `get_default_ess_options` to default to fides for local optimization instead of no local optimizer * Added a wrapper for fides to forward walltime and function evaluation limits --- doc/conf.py | 4 +- doc/references.bib | 67 ++++++++++++++++++ pypesto/optimize/__init__.py | 8 ++- pypesto/optimize/ess/__init__.py | 6 +- pypesto/optimize/ess/cess.py | 18 ++--- pypesto/optimize/ess/ess.py | 33 +++------ pypesto/optimize/ess/sacess.py | 116 +++++++++++++++++++++++++++---- test/optimize/test_optimize.py | 19 ++--- 8 files changed, 215 insertions(+), 56 deletions(-) create mode 100644 doc/references.bib diff --git a/doc/conf.py b/doc/conf.py index 56b0d041e..c96cf87b0 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -71,6 +71,8 @@ 'autodoc_inherit_docstrings': True, } autodoc_mock_imports = ["amici"] +autodoc_class_signature = "separated" + # links for intersphinx intersphinx_mapping = { @@ -90,7 +92,7 @@ typehints_document_rtype = True autodoc_typehints = "description" -bibtex_bibfiles = ["using_pypesto.bib"] +bibtex_bibfiles = ["using_pypesto.bib", "references.bib"] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/doc/references.bib b/doc/references.bib new file mode 100644 index 000000000..8508b36c3 --- /dev/null +++ b/doc/references.bib @@ -0,0 +1,67 @@ + +@Article{EgeaBal2009, + author = {Egea, Jose A. and Balsa-Canto, Eva and García, María-Sonia G. and Banga, Julio R.}, + journal = {Industrial & Engineering Chemistry Research}, + title = {Dynamic Optimization of Nonlinear Processes with an Enhanced Scatter Search Method}, + year = {2009}, + issn = {1520-5045}, + month = apr, + number = {9}, + pages = {4388--4401}, + volume = {48}, + creationdate = {2023-11-21T15:56:38}, + doi = {10.1021/ie801717t}, + modificationdate = {2023-11-21T16:27:59}, + publisher = {American Chemical Society (ACS)}, +} + +@Article{EgeaMar2010, + author = {Jose A. Egea and Rafael Martí and Julio R. Banga}, + journal = {Computers & Operations Research}, + title = {An evolutionary method for complex-process optimization}, + year = {2010}, + issn = {0305-0548}, + number = {2}, + pages = {315-324}, + volume = {37}, + abstract = {In this paper we present a new evolutionary method for complex-process optimization. It is partially based on the principles of the scatter search methodology, but it makes use of innovative strategies to be more effective in the context of complex-process optimization using a small number of tuning parameters. In particular, we introduce a new combination method based on path relinking, which considers a broader area around the population members than previous combination methods. We also use a population-update method which improves the balance between intensification and diversification. New strategies to intensify the search and to escape from suboptimal solutions are also presented. The application of the proposed evolutionary algorithm to different sets of both state-of-the-art continuous global optimization and complex-process optimization problems reveals that it is robust and efficient for the type of problems intended to solve, outperforming the results obtained with other methods found in the literature.}, + creationdate = {2023-11-21T15:57:20}, + doi = {https://doi.org/10.1016/j.cor.2009.05.003}, + keywords = {Evolutionary algorithms, Complex-process optimization, Continuous optimization, Global optimization, Metaheuristics}, + modificationdate = {2023-11-21T15:57:20}, + url = {https://www.sciencedirect.com/science/article/pii/S0305054809001440}, +} + + +@Article{VillaverdeEge2012, + author = {Villaverde, Alejandro F and Egea, Jose A and Banga, Julio R}, + journal = {BMC Systems Biology}, + title = {A cooperative strategy for parameter estimation in large scale systems biology models}, + year = {2012}, + issn = {1752-0509}, + month = jun, + number = {1}, + volume = {6}, + creationdate = {2023-11-21T15:57:46}, + doi = {10.1186/1752-0509-6-75}, + modificationdate = {2023-11-21T15:57:46}, + publisher = {Springer Science and Business Media LLC}, +} + + +@Article{PenasGon2017, + author = {Penas, David R. and González, Patricia and Egea, Jose A. and Doallo, Ramón and Banga, Julio R.}, + journal = {BMC Bioinformatics}, + title = {Parameter estimation in large-scale systems biology models: a parallel and self-adaptive cooperative strategy}, + year = {2017}, + issn = {1471-2105}, + month = jan, + number = {1}, + volume = {18}, + creationdate = {2023-11-21T15:57:58}, + doi = {10.1186/s12859-016-1452-4}, + modificationdate = {2023-11-21T15:57:58}, + publisher = {Springer Science and Business Media LLC}, +} + +@Comment{jabref-meta: databaseType:bibtex;} diff --git a/pypesto/optimize/__init__.py b/pypesto/optimize/__init__.py index 7683a935c..1c139800c 100644 --- a/pypesto/optimize/__init__.py +++ b/pypesto/optimize/__init__.py @@ -6,7 +6,13 @@ Multistart optimization with support for various optimizers. """ -from .ess import CESSOptimizer, ESSOptimizer, SacessOptimizer +from .ess import ( + CESSOptimizer, + ESSOptimizer, + SacessOptimizer, + get_default_ess_options, + sacess_fides_wrapper, +) from .load import ( fill_result_from_history, optimization_result_from_history, diff --git a/pypesto/optimize/ess/__init__.py b/pypesto/optimize/ess/__init__.py index fe4de3fe3..ea24210e7 100644 --- a/pypesto/optimize/ess/__init__.py +++ b/pypesto/optimize/ess/__init__.py @@ -7,4 +7,8 @@ FunctionEvaluatorMT, ) from .refset import RefSet -from .sacess import SacessOptimizer, get_default_ess_options +from .sacess import ( + SacessOptimizer, + get_default_ess_options, + sacess_fides_wrapper, +) diff --git a/pypesto/optimize/ess/cess.py b/pypesto/optimize/ess/cess.py index 225d8bf6f..0195f95a4 100644 --- a/pypesto/optimize/ess/cess.py +++ b/pypesto/optimize/ess/cess.py @@ -23,25 +23,21 @@ class CESSOptimizer: r""" Cooperative Enhanced Scatter Search Optimizer (CESS). - A cooperative scatter search algorithm based on [VillaverdeEge2012]_. + A cooperative scatter search algorithm based on :footcite:t:`VillaverdeEge2012`. In short, multiple scatter search instances with different hyperparameters are running in different threads/processes, and exchange information. Some instances focus on diversification while others focus on intensification. Communication happens at fixed time intervals. - Proposed hyperparameter values in [VillaverdeEge2012]_: + Proposed hyperparameter values in :footcite:t:`VillaverdeEge2012`: * ``dim_refset``: ``[0.5 n_parameter, 20 n_parameters]`` * ``local_n2``: ``[0, 100]`` * ``balance``: ``[0, 0.5]`` * ``n_diverse``: ``[5 n_par, 20 n_par]`` - * ``max_eval``: such that :math:`\tau = log10(max_eval / n_par)` is in - [2.5, 3.5], with a recommended default value of 2.5. - - .. [VillaverdeEge2012] 'A cooperative strategy for parameter estimation in - large scale systems biology models', Villaverde, A.F., Egea, - J.A. & Banga, J.R. BMC Syst Biol 2012, 6, 75. - https://doi.org/10.1186/1752-0509-6-75 + * ``max_eval``: such that + :math:`\tau = log10(max\_eval / n\_par) \in [2.5, 3.5]` + with a recommended default value of :math:`\tau = 2.5`. Attributes ---------- @@ -65,6 +61,10 @@ class CESSOptimizer: Starting time of the most recent optimization. i_iter: Current iteration number. + + References + ---------- + .. footbibliography:: """ def __init__( diff --git a/pypesto/optimize/ess/ess.py b/pypesto/optimize/ess/ess.py index 4323e207f..a9e643099 100644 --- a/pypesto/optimize/ess/ess.py +++ b/pypesto/optimize/ess/ess.py @@ -1,28 +1,7 @@ """Enhanced Scatter Search. -See papers on ESS [EgeaBal2009]_ [EgeaMar2010]_, CESS [VillaverdeEge2012]_ and -saCeSS [PenasGon2017]_. - -References -========== - -.. [EgeaBal2009] 'Dynamic Optimization of Nonlinear Processes with an Enhanced - Scatter Search Method', Jose A. Egea, Eva Balsa-Canto, - María-Sonia G. García, and Julio R. Banga, Ind. Eng. Chem. Res. - 2009, 48, 9, 4388–4401. https://doi.org/10.1021/ie801717t - -.. [EgeaMar2010] 'An evolutionary method for complex-process optimization', - Jose A. Egea, Rafael Martí, Julio R. Banga, Computers & Operations Research, - 2010, 37, 2, 315-324. https://doi.org/10.1016/j.cor.2009.05.003 - -.. [VillaverdeEge2012] 'A cooperative strategy for parameter estimation in - large scale systems biology models', Villaverde, A.F., Egea, J.A. & Banga, - J.R. BMC Syst Biol 2012, 6, 75. https://doi.org/10.1186/1752-0509-6-75 - -.. [PenasGon2017] 'Parameter estimation in large-scale systems biology models: - a parallel and self-adaptive cooperative strategy', David R. Penas, - Patricia González, Jose A. Egea, Ramón Doallo and Julio R. Banga, - BMC Bioinformatics 2017, 18, 52. https://doi.org/10.1186/s12859-016-1452-4 +See papers on ESS :footcite:p:`EgeaBal2009,EgeaMar2010`, +CESS :footcite:p:`VillaverdeEge2012`, and saCeSS :footcite:p:`PenasGon2017`. """ import enum import logging @@ -60,6 +39,11 @@ class ESSExitFlag(int, enum.Enum): class ESSOptimizer: """Enhanced Scatter Search (ESS) global optimization. + See papers on ESS :footcite:p:`EgeaBal2009,EgeaMar2010`, + CESS :footcite:p:`VillaverdeEge2012`, and saCeSS :footcite:p:`PenasGon2017`. + + .. footbibliography:: + .. note: Does not implement any constraint handling beyond box constraints """ @@ -83,7 +67,7 @@ def __init__( ): """Construct new ESS instance. - For plausible values of hyperparameters, see VillaverdeEge2012. + For plausible values of hyperparameters, see :footcite:t:`VillaverdeEge2012`. Parameters ---------- @@ -104,6 +88,7 @@ def __init__( In case of a callable, it will be called with the keyword arguments `max_walltime_s` and `max_eval`, which should be passed to the optimizer (if supported) to honor the overall budget. + See :func:`sacess_fides_wrapper` for an example. n_diverse: Number of samples to choose from to construct the initial RefSet max_eval: diff --git a/pypesto/optimize/ess/sacess.py b/pypesto/optimize/ess/sacess.py index cc2e5eee8..748a0f1ca 100644 --- a/pypesto/optimize/ess/sacess.py +++ b/pypesto/optimize/ess/sacess.py @@ -9,7 +9,7 @@ from multiprocessing import Manager, Process from multiprocessing.managers import SyncManager from pathlib import Path -from typing import Any, Dict, List, Optional, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Tuple, Union from uuid import uuid1 from warnings import warn @@ -25,7 +25,11 @@ from .function_evaluator import create_function_evaluator from .refset import RefSet -__all__ = ["SacessOptimizer", "get_default_ess_options"] +__all__ = [ + "SacessOptimizer", + "get_default_ess_options", + "sacess_fides_wrapper", +] logger = logging.getLogger(__name__) @@ -34,15 +38,17 @@ class SacessOptimizer: """SACESS optimizer. A shared-memory-based implementation of the SaCeSS algorithm presented in - [PenasGon2017]_. Multiple processes (`workers`) run ESSs in parallel. + :footcite:t:`PenasGon2017`. Multiple processes (`workers`) run + :class:`enhanced scatter searches (ESSs) ` in parallel. After each ESS iteration, depending on the outcome, there is a chance of exchanging good parameters, and changing ESS hyperparameters to those of - the most promising worker. + the most promising worker. See :footcite:t:`PenasGon2017` for details. + + :class:`SacessOptimizer` can be used with or without a local optimizer, but + it is highly recommended to use one. + + .. footbibliography:: - .. [PenasGon2017] 'Parameter estimation in large-scale systems biology models: - a parallel and self-adaptive cooperative strategy', David R. Penas, - Patricia González, Jose A. Egea, Ramón Doallo and Julio R. Banga, - BMC Bioinformatics 2017, 18, 52. https://doi.org/10.1186/s12859-016-1452-4 """ def __init__( @@ -67,14 +73,21 @@ def __init__( Resource limits such as ``max_eval`` apply to a single CESS iteration, not to the full search. Mutually exclusive with ``num_workers``. + Recommended default settings can be obtained from + :func:`get_default_ess_options`. num_workers: Number of workers to be used. If this argument is given, (different) default ESS settings will be used for each worker. Mutually exclusive with ``ess_init_args``. + See :func:`get_default_ess_options` for details on the default + settings. max_walltime_s: Maximum walltime in seconds. Will only be checked between local optimizations and other simulations, and thus, may be exceeded by the duration of a local search. Defaults to no limit. + Note that in order to impose the wall time limit also on the local + optimizer, the user has to provide a wrapper function similar to + :func:`sacess_fides_wrapper`. ess_loglevel: Loglevel for ESS runs. sacess_loglevel: @@ -117,7 +130,16 @@ def minimize( problem: Problem, startpoint_method: StartpointMethod = None, ): - """Solve the given optimization problem.""" + """Solve the given optimization problem. + + Parameters + ---------- + problem: + Minimization problem. + startpoint_method: + Method for choosing starting points. + **Deprecated. Use ``problem.startpoint_method`` instead.** + """ if startpoint_method is not None: warn( "Passing `startpoint_method` directly is deprecated, use `problem.startpoint_method` instead.", @@ -696,11 +718,21 @@ def _run_worker( return worker.run(problem=problem, startpoint_method=startpoint_method) -def get_default_ess_options(num_workers: int, dim: int) -> List[Dict]: +def get_default_ess_options( + num_workers: int, + dim: int, + local_optimizer: Union[ + bool, + "pypesto.optimize.Optimizer", + Callable[..., "pypesto.optimize.Optimizer"], + ] = True, +) -> List[Dict]: """Get default ESS settings for (SA)CESS. Returns settings for ``num_workers`` parallel scatter searches, combining - more aggressive and more conservative configurations. + more aggressive and more conservative configurations. Mainly intended for + use with :class:`SacessOptimizer`. For details on the different options, + see keyword arguments of :meth:`ESSOptimizer.__init__`. Setting appropriate values for ``n_threads`` and ``local_optimizer`` is left to the user. Defaults to single-threaded and no local optimizer. @@ -710,7 +742,10 @@ def get_default_ess_options(num_workers: int, dim: int) -> List[Dict]: Parameters ---------- num_workers: Number of configurations to return. - dim: Problem dimension. + dim: Problem dimension (number of optimized parameters). + local_optimizer: The local optimizer to use + (see same argument in :class:`ESSOptimizer`), or a boolean indicating + whether to set the default local optimizer (currently :class:`FidesOptimizer`). """ min_dimrefset = 5 @@ -866,7 +901,64 @@ def dim_refset(x): 'local_n2': 1, }, ] + + # Set local optimizer + for cur_settings in settings: + if local_optimizer is True: + cur_settings['local_optimizer'] = sacess_fides_wrapper() + elif local_optimizer is not False: + cur_settings['local_optimizer'] = local_optimizer + return [ settings[0], *(itertools.islice(itertools.cycle(settings[1:]), num_workers - 1)), ] + + +def sacess_fides_wrapper( + fides_options: Optional[dict[str, Any]] = None, + fides_kwargs: Optional[dict[str, Any]] = None, +) -> Callable[..., "pypesto.optimize.Optimizer"]: + """Return a function that creates a :class:`FidesOptimizer` instance. + + To be used with :class:`SacessOptimizer`. The returned optimizer factory + will forward the walltime limit and function evaluation limit imposed on + :class:`SacessOptimizer` to :class:`FidesOptimizer`. Besides that, default + options are used. + + Parameters + ---------- + fides_options: + Options for the :class:`FidesOptimizer`. + See :class:`fides.constants.Options`. + fides_kwargs: + Keyword arguments for the :class:`FidesOptimizer`. See + :meth:`FidesOptimizer.__init__`. Must not include ``options``. + + Returns + ------- + A function to be passed as ``local_optimizer`` to :meth:`ESSOptimizer.__init__`. + """ + from ..optimizer import OptimizerImportError + + try: + from fides.constants import Options as FidesOptions + except ImportError: + raise OptimizerImportError("fides") + + if fides_options is None: + fides_options = {} + if fides_kwargs is None: + fides_kwargs = {} + + def optimizer_factory(max_walltime_s: int, max_eval: int): + fides_options[FidesOptions.MAXTIME] = max_walltime_s + + # only accepts int + if np.isfinite(max_eval): + fides_options[FidesOptions.MAXITER] = int(max_eval) + return pypesto.optimize.FidesOptimizer( + **fides_kwargs, options=fides_options + ) + + return optimizer_factory diff --git a/test/optimize/test_optimize.py b/test/optimize/test_optimize.py index 28d6a670b..fbf4fe690 100644 --- a/test/optimize/test_optimize.py +++ b/test/optimize/test_optimize.py @@ -18,6 +18,13 @@ import pypesto import pypesto.optimize as optimize +from pypesto.optimize.ess import ( + CESSOptimizer, + ESSOptimizer, + SacessOptimizer, + get_default_ess_options, + sacess_fides_wrapper, +) from pypesto.optimize.util import assign_ids from pypesto.store import read_result @@ -445,16 +452,12 @@ def test_history_beats_optimizer(): "ignore:Passing `startpoint_method` directly is deprecated.*:DeprecationWarning" ) @pytest.mark.parametrize("ess_type", ["ess", "cess", "sacess"]) -@pytest.mark.parametrize("local_optimizer", [None, optimize.FidesOptimizer()]) +@pytest.mark.parametrize( + "local_optimizer", + [None, optimize.FidesOptimizer(), sacess_fides_wrapper()], +) @pytest.mark.flaky(reruns=3) def test_ess(problem, local_optimizer, ess_type, request): - from pypesto.optimize.ess import ( - CESSOptimizer, - ESSOptimizer, - SacessOptimizer, - get_default_ess_options, - ) - if ess_type == "ess": ess = ESSOptimizer( dim_refset=10, From 506a0e9f7b69f9c751e909c11545786036b4a4ae Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 27 Nov 2023 09:20:36 +0100 Subject: [PATCH 2/3] func->class --- pypesto/optimize/__init__.py | 2 +- pypesto/optimize/ess/__init__.py | 2 +- pypesto/optimize/ess/ess.py | 2 +- pypesto/optimize/ess/sacess.py | 70 +++++++++++++++++++------------- test/optimize/test_optimize.py | 4 +- 5 files changed, 46 insertions(+), 34 deletions(-) diff --git a/pypesto/optimize/__init__.py b/pypesto/optimize/__init__.py index 1c139800c..4845aa9dd 100644 --- a/pypesto/optimize/__init__.py +++ b/pypesto/optimize/__init__.py @@ -9,9 +9,9 @@ from .ess import ( CESSOptimizer, ESSOptimizer, + SacessFidesFactory, SacessOptimizer, get_default_ess_options, - sacess_fides_wrapper, ) from .load import ( fill_result_from_history, diff --git a/pypesto/optimize/ess/__init__.py b/pypesto/optimize/ess/__init__.py index ea24210e7..3962f5118 100644 --- a/pypesto/optimize/ess/__init__.py +++ b/pypesto/optimize/ess/__init__.py @@ -8,7 +8,7 @@ ) from .refset import RefSet from .sacess import ( + SacessFidesFactory, SacessOptimizer, get_default_ess_options, - sacess_fides_wrapper, ) diff --git a/pypesto/optimize/ess/ess.py b/pypesto/optimize/ess/ess.py index a9e643099..4eded5069 100644 --- a/pypesto/optimize/ess/ess.py +++ b/pypesto/optimize/ess/ess.py @@ -88,7 +88,7 @@ def __init__( In case of a callable, it will be called with the keyword arguments `max_walltime_s` and `max_eval`, which should be passed to the optimizer (if supported) to honor the overall budget. - See :func:`sacess_fides_wrapper` for an example. + See :class:`SacessFidesFactory` for an example. n_diverse: Number of samples to choose from to construct the initial RefSet max_eval: diff --git a/pypesto/optimize/ess/sacess.py b/pypesto/optimize/ess/sacess.py index 748a0f1ca..ae537ee24 100644 --- a/pypesto/optimize/ess/sacess.py +++ b/pypesto/optimize/ess/sacess.py @@ -28,7 +28,7 @@ __all__ = [ "SacessOptimizer", "get_default_ess_options", - "sacess_fides_wrapper", + "SacessFidesFactory", ] logger = logging.getLogger(__name__) @@ -87,7 +87,7 @@ def __init__( the duration of a local search. Defaults to no limit. Note that in order to impose the wall time limit also on the local optimizer, the user has to provide a wrapper function similar to - :func:`sacess_fides_wrapper`. + :meth:`SacessFidesFactory.__call__`. ess_loglevel: Loglevel for ESS runs. sacess_loglevel: @@ -905,7 +905,7 @@ def dim_refset(x): # Set local optimizer for cur_settings in settings: if local_optimizer is True: - cur_settings['local_optimizer'] = sacess_fides_wrapper() + cur_settings['local_optimizer'] = SacessFidesFactory() elif local_optimizer is not False: cur_settings['local_optimizer'] = local_optimizer @@ -915,16 +915,13 @@ def dim_refset(x): ] -def sacess_fides_wrapper( - fides_options: Optional[dict[str, Any]] = None, - fides_kwargs: Optional[dict[str, Any]] = None, -) -> Callable[..., "pypesto.optimize.Optimizer"]: - """Return a function that creates a :class:`FidesOptimizer` instance. +class SacessFidesFactory: + """Factory for :class:`FidesOptimizer` instances for use with :class:`SacessOptimizer`. + + :meth:`__call__` will forward the walltime limit and function evaluation + limit imposed on :class:`SacessOptimizer` to :class:`FidesOptimizer`. + Besides that, default options are used. - To be used with :class:`SacessOptimizer`. The returned optimizer factory - will forward the walltime limit and function evaluation limit imposed on - :class:`SacessOptimizer` to :class:`FidesOptimizer`. Besides that, default - options are used. Parameters ---------- @@ -935,30 +932,45 @@ def sacess_fides_wrapper( Keyword arguments for the :class:`FidesOptimizer`. See :meth:`FidesOptimizer.__init__`. Must not include ``options``. - Returns - ------- - A function to be passed as ``local_optimizer`` to :meth:`ESSOptimizer.__init__`. """ - from ..optimizer import OptimizerImportError - try: - from fides.constants import Options as FidesOptions - except ImportError: - raise OptimizerImportError("fides") + def __init__( + self, + fides_options: Optional[dict[str, Any]] = None, + fides_kwargs: Optional[dict[str, Any]] = None, + ): + if fides_options is None: + fides_options = {} + if fides_kwargs is None: + fides_kwargs = {} + + self._fides_options = fides_options + self._fides_kwargs = fides_kwargs - if fides_options is None: - fides_options = {} - if fides_kwargs is None: - fides_kwargs = {} + # Check if fides is installed + try: + import fides # noqa F401 + except ImportError: + from ..optimizer import OptimizerImportError + + raise OptimizerImportError("fides") + + def __call__( + self, max_walltime_s: int, max_eval: int + ) -> ["pypesto.optimize.FidesOptimizer"]: + """Create a :class:`FidesOptimizer` instance.""" + + from fides.constants import Options as FidesOptions - def optimizer_factory(max_walltime_s: int, max_eval: int): - fides_options[FidesOptions.MAXTIME] = max_walltime_s + options = self._fides_options.copy() + options[FidesOptions.MAXTIME] = max_walltime_s # only accepts int if np.isfinite(max_eval): - fides_options[FidesOptions.MAXITER] = int(max_eval) + options[FidesOptions.MAXITER] = int(max_eval) return pypesto.optimize.FidesOptimizer( - **fides_kwargs, options=fides_options + **self._fides_kwargs, options=options ) - return optimizer_factory + def __repr__(self): + return f"{self.__class__.__name__}(fides_options={self._fides_options}, fides_kwargs={self._fides_kwargs})" diff --git a/test/optimize/test_optimize.py b/test/optimize/test_optimize.py index fbf4fe690..346417fdf 100644 --- a/test/optimize/test_optimize.py +++ b/test/optimize/test_optimize.py @@ -21,9 +21,9 @@ from pypesto.optimize.ess import ( CESSOptimizer, ESSOptimizer, + SacessFidesFactory, SacessOptimizer, get_default_ess_options, - sacess_fides_wrapper, ) from pypesto.optimize.util import assign_ids from pypesto.store import read_result @@ -454,7 +454,7 @@ def test_history_beats_optimizer(): @pytest.mark.parametrize("ess_type", ["ess", "cess", "sacess"]) @pytest.mark.parametrize( "local_optimizer", - [None, optimize.FidesOptimizer(), sacess_fides_wrapper()], + [None, optimize.FidesOptimizer(), SacessFidesFactory()], ) @pytest.mark.flaky(reruns=3) def test_ess(problem, local_optimizer, ess_type, request): From 4d92f99f525898787e72941d8f1844019e8b954d Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 28 Nov 2023 12:29:39 +0100 Subject: [PATCH 3/3] .. --- doc/references.bib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/references.bib b/doc/references.bib index 8508b36c3..42fd9dd56 100644 --- a/doc/references.bib +++ b/doc/references.bib @@ -26,7 +26,7 @@ @Article{EgeaMar2010 volume = {37}, abstract = {In this paper we present a new evolutionary method for complex-process optimization. It is partially based on the principles of the scatter search methodology, but it makes use of innovative strategies to be more effective in the context of complex-process optimization using a small number of tuning parameters. In particular, we introduce a new combination method based on path relinking, which considers a broader area around the population members than previous combination methods. We also use a population-update method which improves the balance between intensification and diversification. New strategies to intensify the search and to escape from suboptimal solutions are also presented. The application of the proposed evolutionary algorithm to different sets of both state-of-the-art continuous global optimization and complex-process optimization problems reveals that it is robust and efficient for the type of problems intended to solve, outperforming the results obtained with other methods found in the literature.}, creationdate = {2023-11-21T15:57:20}, - doi = {https://doi.org/10.1016/j.cor.2009.05.003}, + doi = {10.1016/j.cor.2009.05.003}, keywords = {Evolutionary algorithms, Complex-process optimization, Continuous optimization, Global optimization, Metaheuristics}, modificationdate = {2023-11-21T15:57:20}, url = {https://www.sciencedirect.com/science/article/pii/S0305054809001440},