seismometer.core.autometrics.store_call_parameters

seismometer.core.autometrics.store_call_parameters(func=None, name=None, cohort_col=None, subgroups=None, cohort_dict=None)

Decorator logic for storing call parameters. The internal function pattern is because we need to be able to say either @decorator or @decorator(params=…), and so handle both functions as arguments (first case) or returning such a function (second case).

Parameters:
  • func (Callable[..., Any], optional) – The function we are wrapping.

  • name (str, optional) – What name to store in the call. (Maybe we want to represent _internal_generate_widget_actually as just generate_widget, for example).

  • extra_params (Callable[tuple, dict, dict], optional) – Extra arguments we need to reconstruct the call.

  • cohort_col (str, optional) – Which function parameter represents a cohort (like Age).

  • subgroups (str, optional) – Which function parameter represents a list of subgroups (like 70+, 10-20).

  • cohort_dict (dict, optional) – Which function parameter represents a dict like {“Age”: [“70+”, “[10-20)”]}

Returns:

_description_

Return type:

Callable[…, Any]