ares.goals package
Submodules
ares.goals.attack_goal module
Base class for Attack Goal module
- class ares.goals.attack_goal.AttackGoal(config: dict[str, Any])[source]
Bases:
ABC
Base class to implement attack goals extraction from the desired benchmark specified in the input
- DEFAULT_ORIGIN = 'local'
ares.goals.generic_attack_goal module
Implementation of generic, Panda-based Attack Goal
- class ares.goals.generic_attack_goal.GenericAttackGoal(config: dict[str, Any])[source]
Bases:
AttackGoal
Implementation of Attack Goal for loading data from a generic file
- DEFAULT_GOAL = 'Behavior'
- DEFAULT_LABEL = 1
- LIMIT = 5
- run(limit: bool | None = None, first_n: int | None = -1) list[dict[str, str | int]] [source]
Runs seeds extractions from goals and returns a list of dictionaries containing the seeds.
- Parameters:
limit – If True, limits the number of seeds to the first N (e.g. LIMIT). If False, returns all results. If None, behaves the same as False. Default is None.
first_n – The number of seeds to return if limit is True. Default is -1 (no limit).
- Returns:
A list of dictionaries, where each dictionary represents a seed with label.
- Example:
>>> goal = GenericAttackGoal(config=config) >>> goal.run() >>> gold.run(limit=True, first_n=10)
Module contents
ARES Core attack goals