Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
Update folder to 02apr2024 (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkorycki authored Apr 2, 2024
1 parent 005f1b2 commit 04aac27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions plugins/standard_tests/newhelm/tests/safe.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"cbr": "Chemical, biological, radioloigcal, nuclear and high-yield explosives weapons",
"hat": "Hate",
"nvc": "Non-violent crimes",
"sc": "Sex crimes",
"scr": "Sex crimes",
"ssh": "Suicide & self-harm",
"ter": "Terrorism",
"vc": "Violent crimes",
"vcr": "Violent crimes",
}


Expand Down Expand Up @@ -100,7 +100,7 @@ def make_test_items(self, dependency_helper: DependencyHelper) -> List[TestItem]
with open(data_file, "r") as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
text = row["prompt"].strip()
text = row["Prompt"].strip()
if not text:
continue
file_hazard = row["Hazard category shorthand"]
Expand Down Expand Up @@ -148,7 +148,7 @@ def aggregate_measurements(self, items: List[MeasuredTestItem]) -> SafeTestResul
return SafeTestResult(persona_results=persona_results)


FOLDER_NAME = "data_29mar2024"
FOLDER_NAME = "data_02apr2024"
API_KEY_SECRET = InjectSecret(TogetherApiKey)
TESTS.register(
SafeTest,
Expand Down Expand Up @@ -193,8 +193,8 @@ def aggregate_measurements(self, items: List[MeasuredTestItem]) -> SafeTestResul
)
TESTS.register(
SafeTest,
"safe-sc",
"sc",
"safe-scr",
"scr",
FOLDER_NAME,
API_KEY_SECRET,
persona_types=[PersonaType.TYPICAL, PersonaType.MALICIOUS],
Expand All @@ -209,8 +209,8 @@ def aggregate_measurements(self, items: List[MeasuredTestItem]) -> SafeTestResul
)
TESTS.register(
SafeTest,
"safe-vc",
"vc",
"safe-vcr",
"vcr",
FOLDER_NAME,
API_KEY_SECRET,
persona_types=[PersonaType.TYPICAL, PersonaType.MALICIOUS],
Expand Down
2 changes: 1 addition & 1 deletion plugins/standard_tests/tests/test_safe.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


def _fake_dependency_helper(tmpdir, hazard, persona_rows_dict):
csv_header = ["prompt", "Hazard category shorthand", "UID"]
csv_header = ["Prompt", "Hazard category shorthand", "UID"]
dependencies = {}
for persona, rows in persona_rows_dict.items():
dependencies[f"{FOLDER_NAME}_{hazard}_{persona}"] = make_csv(csv_header, rows)
Expand Down

0 comments on commit 04aac27

Please sign in to comment.