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
1701c4e2
Commit
1701c4e2
authored
Aug 14, 2023
by
lintangsutawika
Browse files
add warning log if prompt returns empty string
parent
722b8974
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
lm_eval/api/task.py
lm_eval/api/task.py
+2
-0
No files found.
lm_eval/api/task.py
View file @
1701c4e2
...
@@ -766,6 +766,7 @@ class ConfigurableTask(Task):
...
@@ -766,6 +766,7 @@ class ConfigurableTask(Task):
return
applied_prompt
[
0
]
return
applied_prompt
[
0
]
else
:
else
:
eval_logger
.
warning
(
"Applied prompt returns empty string"
)
eval_logger
.
warning
(
"Applied prompt returns empty string"
)
return
applied_prompt
[
0
]
else
:
else
:
print
(
type
(
doc_to_text
))
print
(
type
(
doc_to_text
))
raise
TypeError
raise
TypeError
...
@@ -800,6 +801,7 @@ class ConfigurableTask(Task):
...
@@ -800,6 +801,7 @@ class ConfigurableTask(Task):
return
applied_prompt
[
1
]
return
applied_prompt
[
1
]
else
:
else
:
eval_logger
.
warning
(
"Applied prompt returns empty string"
)
eval_logger
.
warning
(
"Applied prompt returns empty string"
)
return
applied_prompt
[
0
]
else
:
else
:
raise
TypeError
raise
TypeError
...
...
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