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
7f557daa
Commit
7f557daa
authored
Jul 05, 2023
by
haileyschoelkopf
Browse files
raise ValueError when invalid task passed
parent
328f0e85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lm_eval/utils.py
lm_eval/utils.py
+1
-1
No files found.
lm_eval/utils.py
View file @
7f557daa
...
...
@@ -94,10 +94,10 @@ class MultiChoice:
def
__contains__
(
self
,
values
):
for
value
in
values
.
split
(
","
):
if
len
(
fnmatch
.
filter
(
self
.
choices
,
value
))
==
0
:
eval_logger
.
warning
(
"{} is not in task list."
.
format
(
value
))
eval_logger
.
info
(
f
"Available tasks to choose:"
)
for
choice
in
self
.
choices
:
eval_logger
.
info
(
f
" -
{
choice
}
"
)
raise
ValueError
(
"'{}' is not in task list"
.
format
(
value
))
return
True
def
__iter__
(
self
):
...
...
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