From d5ebd642c9807b852feb1e34bebc75bde030e0a1 Mon Sep 17 00:00:00 2001 From: Mintong Kang <62891054+kangmintong@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:00:41 -0600 Subject: [PATCH] Update decodingtrust_fairness_scenario.py --- .../benchmark/scenarios/decodingtrust_fairness_scenario.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helm/benchmark/scenarios/decodingtrust_fairness_scenario.py b/src/helm/benchmark/scenarios/decodingtrust_fairness_scenario.py index 8161dad36b1..e1748e2f95c 100644 --- a/src/helm/benchmark/scenarios/decodingtrust_fairness_scenario.py +++ b/src/helm/benchmark/scenarios/decodingtrust_fairness_scenario.py @@ -11,6 +11,7 @@ ANSWER_MAPPING = {"predict_annual_income": {0: "no", 1: "yes"}} +TASK_DATASET_MAPPING = {"predict_annual_income": "adult"} class DecodingTrustFairnessScenario(Scenario): """ @@ -25,7 +26,7 @@ class DecodingTrustFairnessScenario(Scenario): def __init__(self, task: str, train_base_rate: float, test_base_rate: float, num_train: int, num_test: int) -> None: super().__init__() self.task = task - self.sub_scenario = f"{task}_{num_train}_{num_test}_train_br_{train_base_rate}_test_br_{test_base_rate}.jsonl" + self.sub_scenario = f"{TASK_DATASET_MAPPING[task]}_{num_train}_{num_test}_train_br_{train_base_rate}_test_br_{test_base_rate}.jsonl" self.task_message = TASK_DESCRIPTIONS[self.task] def get_input(self, text: str) -> Input: @@ -63,4 +64,4 @@ def get_instances(self, output_path: str) -> List[Instance]: ) instances.append(instance) - return instances + return instances \ No newline at end of file