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
02362e6a
Unverified
Commit
02362e6a
authored
Jul 06, 2023
by
Lintang Sutawika
Committed by
GitHub
Jul 06, 2023
Browse files
Merge branch 'big-refactor' into refactor-more-tasks
parents
b1b5239d
0ba4ae15
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
lm_eval/utils.py
lm_eval/utils.py
+3
-2
main.py
main.py
+0
-2
setup.py
setup.py
+1
-1
No files found.
lm_eval/utils.py
View file @
02362e6a
...
...
@@ -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
):
...
...
@@ -468,7 +468,8 @@ def pad_and_concat(
),
f
"Unrecognized padding type: '
{
padding_side
}
' not 'left' or 'right'"
for
i
,
tensor
in
enumerate
(
tensors
):
tensor
=
tensor
.
squeeze
(
0
)
# squeeze, in case passed [1, seq] size
if
len
(
tensor
.
shape
)
==
2
:
tensor
=
tensor
.
squeeze
(
0
)
# squeeze, in case passed [1, seq] size
tensor_len
=
tensor
.
shape
[
0
]
if
tensor_len
<
max_length
:
if
padding_side
==
"right"
:
...
...
main.py
View file @
02362e6a
...
...
@@ -43,7 +43,6 @@ def parse_args():
parser
.
add_argument
(
"--decontamination_ngrams_path"
,
default
=
None
)
parser
.
add_argument
(
"--check_integrity"
,
action
=
"store_true"
)
parser
.
add_argument
(
"--write_out"
,
action
=
"store_true"
,
default
=
False
)
parser
.
add_argument
(
"--output_base_path"
,
type
=
str
,
default
=
None
)
return
parser
.
parse_args
()
...
...
@@ -90,7 +89,6 @@ def main():
decontamination_ngrams_path
=
args
.
decontamination_ngrams_path
,
check_integrity
=
args
.
check_integrity
,
write_out
=
args
.
write_out
,
output_base_path
=
args
.
output_base_path
,
)
if
results
is
not
None
:
...
...
setup.py
View file @
02362e6a
...
...
@@ -43,7 +43,7 @@ setuptools.setup(
"sacrebleu==1.5.0"
,
"scikit-learn>=0.24.1"
,
"sqlitedict"
,
"torch>=1.
7
"
,
"torch>=1.
8
"
,
"tqdm-multiprocess"
,
"transformers>=4.1"
,
"zstandard"
,
...
...
Prev
1
2
Next
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