deephyper.search.nas.Random#

class deephyper.search.nas.Random(problem, evaluator, random_state: int = None, log_dir: str = '.', verbose: int = 0, **kwargs)[source]#

Bases: NeuralArchitectureSearch

Random neural architecture search. This search algorithm is compatible with a NaProblem defining fixed or variable 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 or RandomState, 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.

Methods

check_evaluator

dump_context

Dumps the context in the log folder.

extend_results_with_pareto_efficient

Extend the results DataFrame with a column pareto_efficient which is True if the point is Pareto efficient.

search

Execute the search algorithm.

to_json

Returns a json version of the search object.

Attributes

search_id

The identifier of the search used by the evaluator.

dump_context()#

Dumps the context in the log folder.

extend_results_with_pareto_efficient(df_path: str)#

Extend the results DataFrame with a column pareto_efficient which is True if the point is Pareto efficient.

Parameters:

df (pd.DataFrame) – the input results DataFrame.

search(max_evals: int = -1, timeout: int = None, max_evals_strict: bool = False)#

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.

  • max_evals_strict (bool, optional) – If True the search will not spawn more than max_evals jobs. Defaults to False.

Returns:

a pandas DataFrame containing the evaluations performed or None if the search could not evaluate any configuration.

Return type:

DataFrame

property search_id#

The identifier of the search used by the evaluator.

to_json()#

Returns a json version of the search object.