MCPcopy Create free account
hub / github.com/ChenWu98/agent-attack / get_attack_fn

Function get_attack_fn

agent_attack/attacks/__init__.py:6–14  ·  view source on GitHub ↗
(attack)

Source from the content-addressed store, hash-verified

4
5
6def get_attack_fn(attack):
7 if attack == "pgd":
8 return pgd
9 elif attack == "bim":
10 return bim
11 elif attack == "clip_attack":
12 return clip_attack
13 else:
14 raise ValueError(f"Attack {attack} not supported.")

Callers 2

runFunction · 0.90
runFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected