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
887b0edf
Commit
887b0edf
authored
Nov 23, 2022
by
haileyschoelkopf
Browse files
patch reordering to allow duplicate requests for now
parent
8321b1b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
lm_eval/utils.py
lm_eval/utils.py
+3
-1
No files found.
lm_eval/utils.py
View file @
887b0edf
...
...
@@ -123,10 +123,12 @@ class Reorderer:
self
.
size
=
len
(
arr
)
arr
=
list
(
enumerate
(
arr
))
arr
=
group
(
arr
,
lambda
x
:
fn
(
x
[
1
]))
arr
=
[([
y
[
0
]
for
y
in
x
],
x
[
0
][
1
])
for
x
in
arr
]
arr
=
[([
y
[
0
]],
x
[
0
][
1
])
for
x
in
arr
for
y
in
x
]
# arr = [([y[0] for y in x], x[0][1]) for x in arr]
arr
.
sort
(
key
=
lambda
x
:
fn
(
x
[
1
]))
self
.
arr
=
arr
[
print
(
x
)
for
x
in
arr
[:
3
]]
def
get_reordered
(
self
):
return
[
x
[
1
]
for
x
in
self
.
arr
]
...
...
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