refactor: further improve hyper function wording

This commit is contained in:
Matthias
2026-05-17 20:17:43 +02:00
parent 875daac375
commit 3d91223c2b
+5 -2
View File
@@ -97,7 +97,7 @@ class HyperStrategyMixin:
params_values = deep_merge_dicts(
self._ft_params_from_file.get(space, {}), getattr(self, f"{space}_params", {})
)
self._ft_load_params(self._ft_hyper_params[space], params_values, space, hyperopt)
self._ft_set_param(self._ft_hyper_params[space], params_values, space, hyperopt)
def load_params_from_file(self) -> dict:
filename_str = getattr(self, "__file__", "")
@@ -119,12 +119,15 @@ class HyperStrategyMixin:
return {}
def _ft_load_params(
def _ft_set_param(
self, params: SpaceParams, param_values: dict, space: str, hyperopt: bool = False
) -> None:
"""
Set optimizable parameter values.
:param params: Dictionary with new parameter values.
:param param_values: Dictionary with values to set.
:param space: The space to which the parameters belong.
:param hyperopt: Flag indicating if we are in hyperopt mode.
"""
if not param_values:
logger.info(f"No params for {space} found, using default values.")