HyperParameterSet#
- class mergernet.core.hp.HyperParameterSet[source]#
Bases:
object
Represents a set of hyperparameters and handles the hyperparameters register and access.
- Parameters:
*args (HyperParameter) – Any HyperParameter instance created by HP factory
See also
- add(hyperparameters: Sequence[dict | HyperParameter])[source]#
Parses a sequence of dictionaries that represents the hyperparameters
- Parameters:
hyperparameters (array-like of dictionaries or arrar-like of HyperParameter) – The list of hyperparameters that will be added to this hyperparameters set
- clear_values_dict()[source]#
Clear
last_value
property of the hyperparameter, relevant when training with conditional hyperparameters
- get(name: str, trial: FrozenTrial | None = None, default: Any | None = None) Any [source]#
Get the value of a hyperparameter identified by its name. For hyperparameters different than ConstantHyperParameter, this method will use optuna’s seggest api
- Parameters:
name (str) – The hyperparamer name
trial (optuna.trial.FrozenTrial) – The optuan trial instance
default (Any) – Default value returned if the specified hyperparameter name wasn’t found
- Returns:
The hyperparameter value
- Return type:
Any