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
e162dc46
Commit
e162dc46
authored
Apr 26, 2024
by
haileyschoelkopf
Browse files
run linters
parent
197594f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
lm_eval/tasks/fda/task.py
lm_eval/tasks/fda/task.py
+2
-2
lm_eval/tasks/squad_completion/task.py
lm_eval/tasks/squad_completion/task.py
+2
-2
lm_eval/tasks/swde/task.py
lm_eval/tasks/swde/task.py
+2
-2
No files found.
lm_eval/tasks/fda/task.py
View file @
e162dc46
...
...
@@ -34,7 +34,7 @@ class FDA(ConfigurableTask):
def
doc_to_target
(
self
,
doc
):
return
doc
[
"value"
]
def
construct_requests
(
self
,
doc
,
ctx
,
**
kwargs
):
"""Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM.
...
...
@@ -93,7 +93,7 @@ class FDA(ConfigurableTask):
return
{
"contains"
:
True
,
# Exact match (the normalized answer exactly match the gold answer
}
def
contains_score
(
prediction
:
str
,
labels
:
List
[
str
]):
return
max
(
...
...
lm_eval/tasks/squad_completion/task.py
View file @
e162dc46
...
...
@@ -34,7 +34,7 @@ class SQUADCompletion(ConfigurableTask):
def
doc_to_target
(
self
,
doc
):
return
doc
[
"value"
]
def
construct_requests
(
self
,
doc
,
ctx
,
**
kwargs
):
"""Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM.
...
...
@@ -93,7 +93,7 @@ class SQUADCompletion(ConfigurableTask):
return
{
"contains"
:
True
,
# Exact match (the normalized answer exactly match the gold answer
}
def
contains_score
(
prediction
:
str
,
labels
:
List
[
str
]):
return
max
(
...
...
lm_eval/tasks/swde/task.py
View file @
e162dc46
...
...
@@ -38,7 +38,7 @@ class SWDE(ConfigurableTask):
def
doc_to_target
(
self
,
doc
):
return
doc
[
"value"
]
def
construct_requests
(
self
,
doc
,
ctx
,
**
kwargs
):
"""Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM.
...
...
@@ -97,7 +97,7 @@ class SWDE(ConfigurableTask):
return
{
"contains"
:
True
,
# Exact match (the normalized answer exactly match the gold answer
}
def
contains_score
(
prediction
:
str
,
labels
:
List
[
str
]):
return
max
(
...
...
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