deephyper.search.nas.RegularizedEvolution

deephyper.search.nas.RegularizedEvolution

class deephyper.search.nas.RegularizedEvolution(problem, evaluator, random_state: Optional[int] = None, log_dir: str = '.', verbose: int = 0, population_size: int = 100, sample_size: int = 10, **kwargs)[source]

Bases: deephyper.search.nas._base.NeuralArchitectureSearch

Regularized evolution neural architecture search. This search is only compatible with a NaProblem that has fixed hyperparameters.

Parameters
  • problem (NaProblem) – Neural architecture search problem describing the search space to explore.

  • evaluator (Evaluator) – An Evaluator instance responsible of distributing the tasks.

  • random_state (int, optional) – Random seed. Defaults to None.

  • log_dir (str, optional) – Log directory where search’s results are saved. Defaults to “.”.

  • verbose (int, optional) – Indicate the verbosity level of the search. Defaults to 0.

  • population_size (int, optional) – the number of individuals to keep in the population. Defaults to 100.

  • sample_size (int, optional) – the number of individuals that should participate in each tournament. Defaults to 10.

Methods

search

Execute the search algorithm.

terminate

Terminate the search.

search(max_evals: int = - 1, timeout: Optional[int] = None)

Execute the search algorithm.

Parameters
  • max_evals (int, optional) – The maximum number of evaluations of the run function to perform before stopping the search. Defaults to -1, will run indefinitely.

  • timeout (int, optional) – The time budget (in seconds) of the search before stopping. Defaults to None, will not impose a time budget.

Returns

a pandas DataFrame containing the evaluations performed.

Return type

DataFrame

terminate()

Terminate the search.

Raises

SearchTerminationError – raised when the search is terminated with SIGALARM