syne_tune.optimizer.schedulers.multiobjective.nsga2_searcher module

class syne_tune.optimizer.schedulers.multiobjective.nsga2_searcher.NSGA2Searcher(config_space, metric, mode='min', points_to_evaluate=None, population_size=20, **kwargs)[source]

Bases: StochasticSearcher

This is a wrapper around the NSGA-2 [1] implementation of pymoo [2].

[1] K. Deb, A. Pratap, S. Agarwal, and T. Meyarivan.
A fast and elitist multiobjective genetic algorithm: nsga-II.
Trans. Evol. Comp, 6(2):182–197, April 2002.
[2] J. Blank and K. Deb
pymoo: Multi-Objective Optimization in Python
IEEE Access, 2020
Parameters:
  • config_space (Dict[str, Any]) – Configuration space

  • metric (List[str]) –

    Name of metric passed to update(). Can be obtained from scheduler in configure_scheduler(). In the case of multi-objective optimization,

    metric is a list of strings specifying all objectives to be optimized.

  • points_to_evaluate (Optional[List[dict]]) – List of configurations to be evaluated initially (in that order). Each config in the list can be partially specified, or even be an empty dict. For each hyperparameter not specified, the default value is determined using a midpoint heuristic. If None (default), this is mapped to [dict()], a single default config determined by the midpoint heuristic. If [] (empty list), no initial configurations are specified.

  • mode (Union[List[str], str]) – Should metric be minimized (“min”, default) or maximized (“max”). In the case of multi-objective optimization, mode can be a list defining for each metric if it is minimized or maximized

  • population_size (int) – Size of the population

get_config(**kwargs)[source]

Suggest a new configuration.

Note: Query _next_initial_config() for initial configs to return first.

Parameters:

kwargs – Extra information may be passed from scheduler to searcher

Return type:

Optional[Dict[str, Any]]

Returns:

New configuration. The searcher may return None if a new configuration cannot be suggested. In this case, the tuning will stop. This happens if searchers never suggest the same config more than once, and all configs in the (finite) search space are exhausted.