garak.buffs.base

Base classes for buffs.

class Buff(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)Source

Bases: Configurable

Base class for a buff.

A buff should take as input a list of attempts, and return a list of events. It should be able to return a generator. It’s worth storing the origin attempt ID in the notes attrib of derivative attempt objects.

active = True
buff(source_attempts: List[Attempt], probename='') Iterable[Attempt]Source
doc_uri = ''
extra_dependency_names = []
lang = None
transform(attempt: Attempt) Iterable[Attempt]Source

attempt copying is handled elsewhere. isn’t that nice

untransform(attempt: Attempt) AttemptSource

Only necessary if buff requires a post buff hook