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
5a5acc08
Unverified
Commit
5a5acc08
authored
Feb 14, 2025
by
Baber Abbasi
Committed by
GitHub
Feb 14, 2025
Browse files
fix `construct_requests` kwargs (#2700)
parent
157d8c3c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
lm_eval/tasks/fda/task.py
lm_eval/tasks/fda/task.py
+3
-1
lm_eval/tasks/squad_completion/task.py
lm_eval/tasks/squad_completion/task.py
+3
-1
lm_eval/tasks/squadv2/task.py
lm_eval/tasks/squadv2/task.py
+3
-1
lm_eval/tasks/swde/task.py
lm_eval/tasks/swde/task.py
+3
-1
No files found.
lm_eval/tasks/fda/task.py
View file @
5a5acc08
...
...
@@ -33,7 +33,9 @@ class FDA(ConfigurableTask):
def
doc_to_target
(
self
,
doc
):
return
doc
[
"value"
]
def
construct_requests
(
self
,
doc
,
ctx
,
**
kwargs
):
def
construct_requests
(
self
,
doc
,
ctx
,
chat_template
=
None
,
apply_chat_template
=
False
,
**
kwargs
):
"""Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM.
...
...
lm_eval/tasks/squad_completion/task.py
View file @
5a5acc08
...
...
@@ -33,7 +33,9 @@ class SQUADCompletion(ConfigurableTask):
def
doc_to_target
(
self
,
doc
):
return
doc
[
"value"
]
def
construct_requests
(
self
,
doc
,
ctx
,
**
kwargs
):
def
construct_requests
(
self
,
doc
,
ctx
,
chat_template
=
None
,
apply_chat_template
=
False
,
**
kwargs
):
"""Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM.
...
...
lm_eval/tasks/squadv2/task.py
View file @
5a5acc08
...
...
@@ -105,7 +105,9 @@ class SQuAD2(ConfigurableTask):
answer
=
"unanswerable"
return
" "
+
answer
def
construct_requests
(
self
,
doc
,
ctx
,
**
kwargs
):
def
construct_requests
(
self
,
doc
,
ctx
,
chat_template
=
None
,
apply_chat_template
=
False
,
**
kwargs
):
"""Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM.
...
...
lm_eval/tasks/swde/task.py
View file @
5a5acc08
...
...
@@ -33,7 +33,9 @@ class SWDE(ConfigurableTask):
def
doc_to_target
(
self
,
doc
):
return
doc
[
"value"
]
def
construct_requests
(
self
,
doc
,
ctx
,
**
kwargs
):
def
construct_requests
(
self
,
doc
,
ctx
,
chat_template
=
None
,
apply_chat_template
=
False
,
**
kwargs
):
"""Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM.
...
...
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