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
a35eb973
Unverified
Commit
a35eb973
authored
Aug 27, 2025
by
Slim Frikha
Committed by
GitHub
Aug 27, 2025
Browse files
feat(scrolls): delete chat_template from kwargs (#3267)
parent
5ac7cdf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
lm_eval/tasks/scrolls/task.py
lm_eval/tasks/scrolls/task.py
+12
-8
No files found.
lm_eval/tasks/scrolls/task.py
View file @
a35eb973
...
...
@@ -256,8 +256,9 @@ class _SCROLLSMultipleChoiceTask(_SCROLLSTask):
"em"
:
acc_norm
*
100.0
,
}
def
construct_requests
(
self
,
doc
,
ctx
,
**
kwargs
):
apply_chat_template
=
kwargs
.
pop
(
"apply_chat_template"
,
False
)
def
construct_requests
(
self
,
doc
,
ctx
,
chat_template
=
None
,
apply_chat_template
=
False
,
**
kwargs
):
request_list
=
[
Instance
(
request_type
=
"loglikelihood"
,
...
...
@@ -291,8 +292,9 @@ class _SCROLLSSummaryTask(_SCROLLSTask):
"rougeL"
:
(
results
[
0
],
doc
[
"outputs"
]),
}
def
construct_requests
(
self
,
doc
,
ctx
,
**
kwargs
):
kwargs
.
pop
(
"apply_chat_template"
,
False
)
def
construct_requests
(
self
,
doc
,
ctx
,
chat_template
=
None
,
apply_chat_template
=
False
,
**
kwargs
):
return
Instance
(
request_type
=
"generate_until"
,
doc
=
doc
,
...
...
@@ -334,8 +336,9 @@ class Qasper(_SCROLLSTask):
prediction
=
results
[
0
]
return
{
"f1"
:
(
prediction
,
doc
[
"outputs"
])}
def
construct_requests
(
self
,
doc
,
ctx
,
**
kwargs
):
apply_chat_template
=
kwargs
.
pop
(
"apply_chat_template"
,
False
)
def
construct_requests
(
self
,
doc
,
ctx
,
chat_template
=
None
,
apply_chat_template
=
False
,
**
kwargs
):
if
doc
[
"is_yes_no"
]:
return
[
Instance
(
...
...
@@ -416,8 +419,9 @@ class NarrativeQA(_SCROLLSTask):
def
process_results
(
self
,
doc
,
results
):
return
{
"f1"
:
(
results
[
0
],
doc
[
"outputs"
])}
def
construct_requests
(
self
,
doc
,
ctx
,
**
kwargs
):
kwargs
.
pop
(
"apply_chat_template"
,
False
)
def
construct_requests
(
self
,
doc
,
ctx
,
chat_template
=
None
,
apply_chat_template
=
False
,
**
kwargs
):
return
Instance
(
request_type
=
"generate_until"
,
doc
=
doc
,
...
...
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