refactor: further improve hyper function wording
This commit is contained in:
@@ -97,7 +97,7 @@ class HyperStrategyMixin:
|
|||||||
params_values = deep_merge_dicts(
|
params_values = deep_merge_dicts(
|
||||||
self._ft_params_from_file.get(space, {}), getattr(self, f"{space}_params", {})
|
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:
|
def load_params_from_file(self) -> dict:
|
||||||
filename_str = getattr(self, "__file__", "")
|
filename_str = getattr(self, "__file__", "")
|
||||||
@@ -119,12 +119,15 @@ class HyperStrategyMixin:
|
|||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
def _ft_load_params(
|
def _ft_set_param(
|
||||||
self, params: SpaceParams, param_values: dict, space: str, hyperopt: bool = False
|
self, params: SpaceParams, param_values: dict, space: str, hyperopt: bool = False
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Set optimizable parameter values.
|
Set optimizable parameter values.
|
||||||
:param params: Dictionary with new 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:
|
if not param_values:
|
||||||
logger.info(f"No params for {space} found, using default values.")
|
logger.info(f"No params for {space} found, using default values.")
|
||||||
|
|||||||
Reference in New Issue
Block a user