deephyper.search
The search
module brings a modular way to implement new search algorithms and two sub modules. One is for hyperparameter search deephyper.search.hps
and one is for neural architecture search deephyper.search.nas
.
The Search
class is abstract and has different subclasses such as: deephyper.search.ambs
and deephyper.search.ga
.
-
class
deephyper.search.
Search
(problem, evaluator, random_state=None, log_dir='.', verbose=0, **kwargs)[source]
Bases: abc.ABC
Abstract class which represents a search algorithm.
- Parameters
problem ([type]) – [description]
evaluator ([type]) – [description]
random_state ([type], optional) – [description]. Defaults to None.
log_dir (str, optional) – [description]. Defaults to “.”.
verbose (int, optional) – [description]. Defaults to 0.
-
search
(max_evals: int = - 1, timeout: Optional[int] = None)[source]
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 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
()[source]
Terminate the search.
- Raises
SearchTerminationError – raised when the search is terminated with SIGALARM