README
liblaf.cherries.core.params
¶
Classes:
-
ParamPluginProtocol–Hook surface for plugins that receive experiment parameters.
-
ParamsManager–Store experiment parameters and mirror them to plugins.
ParamPluginProtocol
¶
Bases: Protocol
flowchart TD
liblaf.cherries.core.params.ParamPluginProtocol[ParamPluginProtocol]
click liblaf.cherries.core.params.ParamPluginProtocol href "" "liblaf.cherries.core.params.ParamPluginProtocol"
Hook surface for plugins that receive experiment parameters.
Methods:
-
log_param–Record one flattened parameter value.
-
log_params–Record multiple already-flattened parameter values.
log_param
¶
ParamsManager
¶
Store experiment parameters and mirror them to plugins.
Parameters are stored internally with slash-delimited keys and returned as a nested dictionary for summaries.
Parameters:
-
plugins(ParamPluginProtocol) –Plugin delegate that receives parameter events.
-
params(dict[str, Any], default:<class 'dict'>) –dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
Methods:
-
get_param–Return one flattened parameter value.
-
get_params–Return parameters as a nested dictionary.
-
log_param–Store and publish one parameter.
-
log_params–Store and publish multiple parameters.
Attributes:
-
params(dict[str, Any]) –Flattened parameter values by slash-delimited name.
-
plugins(ParamPluginProtocol) –Plugin delegate that receives parameter events.
params
class-attribute
instance-attribute
¶
Flattened parameter values by slash-delimited name.
plugins
instance-attribute
¶
plugins: ParamPluginProtocol
Plugin delegate that receives parameter events.
get_param
¶
get_params
¶
log_param
¶
log_params
¶
Store and publish multiple parameters.
Nested mappings are flattened before storage and plugin delegation.