View source on GitHub |
Abstract tuner class.
tfdf.tuner.Tuner(
use_predefined_hps: bool = False,
trial_num_threads: int = 1,
trial_maximum_training_duration_seconds: Optional[float] = None
)
The user is expected to use one of its instances e.g. RandomSearch.
Methods
choice
choice(
key: str,
values: Union[List[int], List[float], List[str], List[bool]],
merge: bool = False
) -> SearchSpace
Adds a hyperparameter with a list of possible values.
Args | |
---|---|
key
|
Name of the hyper-parameter. |
values
|
List of possible value for the hyperparameter. |
merge
|
If false (default), raises an error if the hyper-parameter already exist. If true, adds values to the parameter if it already exist. |
Returns | |
---|---|
The conditional SearchSpace corresponding to the values in "values". |
set_base_learner
set_base_learner(
learner: str
) -> None
Sets the base learner key.
train_config
train_config() -> TrainConfig
YDF training configuration for the Hyperparameter optimizer.