Skip to content

Commit

Permalink
remove non-functional parts of hendrycks_test_de
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbuschhoff committed Nov 7, 2023
1 parent 4702f70 commit 52e82af
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions lm_eval/tasks/opengptx/hendrycks_test_de.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ def has_test_docs(self):
def validation_docs(self):
return map(self._process_doc, self.dataset["validation"])

def test_docs(self):
return map(self._process_doc, self.dataset["test"])

def _format_subject(self, subject):
index = SUBJECTS.index(subject)
subject = SUBJECTS_DE[index]
Expand Down Expand Up @@ -227,17 +224,6 @@ def format_example(doc, keys):
else doc["answer"],
}

def fewshot_examples(self, k, rnd):
# fewshot_examples is not just sampling from train_docs because dev is
# in the same distribution as val/test but auxiliary_train isn't

if self._fewshot_docs is None:
self._fewshot_docs = list(map(self._process_doc, self.dataset["dev"]))

# use the unchanged order of the dev set without sampling,
# just as in the original code https://github.com/hendrycks/test/blob/master/evaluate.py#L28
return self._fewshot_docs[:k]

def doc_to_text(self, doc):
return doc["query"]

Expand Down

0 comments on commit 52e82af

Please sign in to comment.