pysr3.logger module
- class pysr3.logger.Logger(list_of_keys: Set = ())
Bases:
object
Helper class for logging the progress of iterative methods.
Initializes the logger
- Parameters:
list_of_keys (set[str]) – list of keys for the logger
- add(key, value)
Adds a key-value pair to the logger
- Parameters:
key (str) – key
value (Any) – value for this key
- append(key, value)
Adds value to what’s already stored in the logger. If no such key then it starts with 0.
- Parameters:
key (str) – key
value (Any additive) – value to add
- Returns:
self
- get(key)
Returns the value by key
- Parameters:
key (str) – key
- Returns:
value for this key
- log(parameters)
Records all values of parameters which keys are already in the logger. Ignores the rest.
- Parameters:
parameters (dict) – dictionary with parameters to record.
- Returns:
self