Skip to main content
GitHub source

class MetricZScoreFilter

Usage docs: https://docs.pydantic.dev/2.10/concepts/models/ A base class for creating Pydantic models. Attributes: class_vars: The names of the class variables defined on the model. private_attributes: Metadata about the private attributes of the model. signature: The synthesized __init__ [Signature][inspect.Signature] of the model. pydantic_complete: Whether model building is completed, or if there are still undefined fields. pydantic_core_schema: The core schema of the model. pydantic_custom_init: Whether the model has a custom __init__ function. pydantic_decorators: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1. pydantic_generic_metadata: Metadata for generic models; contains data used for a similar purpose to args, origin, parameters in typing-module generics. May eventually be replaced by these. pydantic_parent_namespace: Parent namespace of the model, used for automatic rebuilding of models. pydantic_post_init: The name of the post-init method for the model, if defined. pydantic_root_model: Whether the model is a [RootModel][pydantic.root_model.RootModel]. pydantic_serializer: The pydantic-core SchemaSerializer used to dump instances of the model. pydantic_validator: The pydantic-core SchemaValidator used to validate instances of the model. pydantic_fields: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. pydantic_computed_fields: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. pydantic_extra: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'. pydantic_fields_set: The names of fields explicitly set during instantiation. pydantic_private: Values of private attributes set on the model instance.

method MetricZScoreFilter.__init__

__init__(
    name: 'str',
    window: 'int' = 30,
    threshold: 'Annotated | Annotated' = 3.0,
    change_dir: 'ChangeDir' = ANY
) → None
Args:
  • name (str): Name of the observed metric.
  • window (int): Size of the window to calculate the metric mean and standard deviation over.
  • threshold (Union[Annotated, Annotated]): Threshold for the z-score.
  • change_dir (ChangeDir): Direction of the z-score change to watch for.
Returns: An MetricZScoreFilter object.