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
b6ae8c4a
Commit
b6ae8c4a
authored
Jul 07, 2025
by
Baber
Browse files
nit
parent
9093b1a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
lm_eval/api/task.py
lm_eval/api/task.py
+2
-3
No files found.
lm_eval/api/task.py
View file @
b6ae8c4a
...
@@ -1801,7 +1801,6 @@ class ConfigurableTask(Task):
...
@@ -1801,7 +1801,6 @@ class ConfigurableTask(Task):
list: A list of metrics calculated for each document.
list: A list of metrics calculated for each document.
"""
"""
if
not
requests
and
not
self
.
instances
:
if
not
requests
and
not
self
.
instances
:
print
(
"sent results"
)
return
None
,
None
return
None
,
None
### Collect values of metrics on all datapoints ###
### Collect values of metrics on all datapoints ###
...
@@ -1832,10 +1831,10 @@ class ConfigurableTask(Task):
...
@@ -1832,10 +1831,10 @@ class ConfigurableTask(Task):
)
)
for
doc_id
,
doc
in
doc_iterator
:
for
doc_id
,
doc
in
doc_iterator
:
_doc_id_true
=
indices
[
doc_id
]
if
indices
else
doc_id
_sample_metric
=
defaultdict
(
list
)
_sample_metric
=
defaultdict
(
list
)
_doc_id_true
=
indices
[
doc_id
]
if
indices
else
doc_id
requests
=
instances_by_doc_id
[
_doc_id_true
]
requests
=
instances_by_doc_id
[
_doc_id_true
]
if
len
(
requests
)
>
1
:
if
self
.
OUTPUT_TYPE
!=
"generate_until"
:
# if one doc has multiple instances then calculate metric together
# if one doc has multiple instances then calculate metric together
metrics
=
self
.
process_results
(
metrics
=
self
.
process_results
(
doc
,
[
req
.
filtered_resps
[
filter_key
]
for
req
in
requests
]
doc
,
[
req
.
filtered_resps
[
filter_key
]
for
req
in
requests
]
...
...
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