Spaces:
Sleeping
Sleeping
Commit ·
a8b148d
1
Parent(s): 6e3f9a2
feat(rewards): add RewardComputer wrapper class with __call__ and reset() for injection
Browse files
rewards/compute_rewards.py
CHANGED
|
@@ -12,3 +12,10 @@ def compute_rewards(action: Any, attack_history: list[dict], llm_result: dict) -
|
|
| 12 |
def reset_scorer() -> None:
|
| 13 |
"""Reset Person 2's novelty embeddings."""
|
| 14 |
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
def reset_scorer() -> None:
|
| 13 |
"""Reset Person 2's novelty embeddings."""
|
| 14 |
pass
|
| 15 |
+
|
| 16 |
+
class RewardComputer:
|
| 17 |
+
def __call__(self, *args, **kwargs):
|
| 18 |
+
return compute_rewards(*args, **kwargs)
|
| 19 |
+
|
| 20 |
+
def reset(self):
|
| 21 |
+
reset_scorer()
|