RandomSearchTuner
RandomSearchTuner
RandomSearchTuner(num_trials: int = 100, automatic_search_space: bool = False, parallel_trials: int = 1, max_trial_duration: Optional[float] = None)
Bases: AbstractTuner
Tuner using random search.
The candidate hyper-parameter can be evaluated independently and in parallel.
Attributes:
Name | Type | Description |
---|---|---|
num_trials |
Number of hyperparameter configurations to evaluate. |
|
automatic_search_space |
If true, automatically define the search space of hyperparameters. In this case, configuring the hyperparameters manually (e.g. calling "choice(...)" on the tuner) is not necessary. |
|
parallel_trials |
Number of trials to evaluate in parallel. The training of
an individual model uses "num_threads" threads (configured in the
learner). Therefore, in the non-distributed training setting, the total
number of threads will be |
|
max_trial_duration |
Maximum training duration of an individual trial
expressed in seconds. This parameter is different from the
|
choice
Adds a hyperparameter with a list of possible values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
Name of the hyperparameter. |
required |
values
|
HyperParameterSequence
|
List of possible values. |
required |
merge
|
bool
|
If false (default), raises an error if the hyperparameter already exist. If true, and if the hyperparameter already exist, adds "values" to the already configured values. If true, and if the hyperparameter does not already exist, raises an error. |
False
|
Returns:
Type | Description |
---|---|
SearchSpace
|
The conditional SearchSpace corresponding to the values in "values". |
set_base_learner_num_threads
set_base_learner_num_threads(num_threads: int) -> None
Sets the number of threads in the base learner.