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
35f58b95
Commit
35f58b95
authored
Mar 26, 2021
by
Leo Gao
Browse files
Change to test before val
parent
0c402690
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lm_eval/evaluator.py
lm_eval/evaluator.py
+5
-5
No files found.
lm_eval/evaluator.py
View file @
35f58b95
...
@@ -23,12 +23,12 @@ def evaluate(lm, task_dict, provide_description, num_fewshot, limit):
...
@@ -23,12 +23,12 @@ def evaluate(lm, task_dict, provide_description, num_fewshot, limit):
# get lists of each type of requeste
# get lists of each type of requeste
for
task_name
,
task
in
task_dict_items
:
for
task_name
,
task
in
task_dict_items
:
#default to validation doc, fall back to test doc if validation unavailable
#default to test doc, fall back to val doc if validation unavailable
# TODO: the val-fallback-to-test system isn't final, we should revisit it at some point
# TODO: the test-fallback-to-val system isn't final, we should revisit it at some point
if
task
.
has_validation_docs
():
if
task
.
has_test_docs
():
task_doc_func
=
task
.
validation_docs
elif
task
.
has_test_docs
():
task_doc_func
=
task
.
test_docs
task_doc_func
=
task
.
test_docs
elif
task
.
has_validation_docs
():
task_doc_func
=
task
.
validation_docs
# deterministically shuffle docs and chop off the first `limit` because sometimes docs are in some kind of order
# deterministically shuffle docs and chop off the first `limit` because sometimes docs are in some kind of order
task_docs
=
list
(
task_doc_func
())
task_docs
=
list
(
task_doc_func
())
...
...
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