Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
7b8d9b72
Commit
7b8d9b72
authored
May 13, 2023
by
Oleh Shliazhko
Browse files
add comment
parent
48c6bd65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
lm_eval/tasks/hendrycks_test.py
lm_eval/tasks/hendrycks_test.py
+3
-1
No files found.
lm_eval/tasks/hendrycks_test.py
View file @
7b8d9b72
...
...
@@ -163,7 +163,9 @@ class GeneralHendrycksTest(MultipleChoiceTask):
if
self
.
_fewshot_docs
is
None
:
self
.
_fewshot_docs
=
list
(
map
(
self
.
_process_doc
,
self
.
dataset
[
"dev"
]))
return
self
.
_fewshot_docs
[:
k
]
# rnd.sample(list(self._fewshot_docs), k)
# 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"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment