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
f09f3ab8
Commit
f09f3ab8
authored
Jul 11, 2023
by
lintangsutawika
Browse files
added error message
parent
4054ab84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lm_eval/api/task.py
lm_eval/api/task.py
+5
-1
No files found.
lm_eval/api/task.py
View file @
f09f3ab8
...
...
@@ -648,7 +648,11 @@ class ConfigurableTask(Task):
self
.
features
=
list
(
test_doc
.
keys
())
test_text
=
self
.
doc_to_text
(
test_doc
)
test_target
=
self
.
doc_to_target
(
test_doc
)
# test_choice = self.doc_to_choice(test_doc)
if
self
.
_config
.
doc_to_choice
is
not
None
:
test_choice
=
self
.
doc_to_choice
(
test_doc
)
if
type
(
test_choice
)
is
not
list
:
eval_logger
.
error
(
"doc_to_choice must return list"
)
if
self
.
_config
.
output_type
==
"multiple_choice"
:
if
type
(
test_text
)
is
list
:
...
...
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