reservoirpy.hyper.parallel_research#

reservoirpy.hyper.parallel_research(objective, dataset, config_path, report_path=None, n_jobs=-1, inner_max_num_threads=None)[source]#

Executes a parallelized hyperparameter search on the provided objective function using the configuration specified. This function uses process-based parallelism through the loky backend of joblib.

For more details on hyper-parameter search using ReservoirPy, take a look at Understand and optimize ESN hyperparameters.

Parameters:
  • objective (Callable) – Objective function defining the function to optimize. Must be able to receive the dataset argument and all parameters sampled by hyperopt during the search. These parameters must be keyword arguments only without default value (this can be achieved by separating them from the other arguments with an empty starred expression. See examples for more info.)

  • dataset (tuple or lists or arrays of data) – Argument used to pass data to the objective function during the hyperopt run. It will be passed as is to the objective function : it can be in whatever format.

  • config_path (str or Path) – Path to the hyperopt experimentation configuration file used to define this run.

  • report_path (str, optional) – Path to the directory where to store the results of the run. By default, this directory is set to be {name of the experiment}/results/.

  • n_jobs (int, default to -1) – Maximum number of concurrent processes to run. If set to -1, it is set to the number of CPUs.

  • inner_max_num_threads (int, optional) – Maximum number of threads allowed within each parallel job (e.g., used by libraries like NumPy). If set to a positive number, it will limit the number of threads per process. If set to -1, there will be no restriction. By default, it is calculated as max(1, number of trials // number of jobs).