pyrit.identifiers.EvaluationIdentity#
- class EvaluationIdentity(identifier: ComponentIdentifier)[source]#
Bases:
ABCWraps a
ComponentIdentifierwith domain-specific eval-hash configuration.Subclasses must set the two
ClassVarfrozensets:TARGET_CHILD_KEYS— child names whose operational params should be stripped (e.g.,{"prompt_target", "converter_target"}).BEHAVIORAL_CHILD_PARAMS— param allowlist applied to those target children (e.g.,{"model_name", "temperature", "top_p"}).
The concrete
eval_hashproperty delegates to the module-levelcompute_eval_hashfree function.- __init__(identifier: ComponentIdentifier) None[source]#
Wrap a ComponentIdentifier and eagerly compute its eval hash.
Methods
__init__(identifier)Wrap a ComponentIdentifier and eagerly compute its eval hash.
Attributes
Behavioral equivalence hash for evaluation grouping.
The underlying component identity.
- property identifier: ComponentIdentifier#
The underlying component identity.