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
f378f306
"configs/vscode:/vscode.git/clone" did not exist on "7f3a16a3e30267d90aa911e5714686b7112da0a6"
Unverified
Commit
f378f306
authored
Sep 26, 2024
by
Baber Abbasi
Committed by
GitHub
Sep 25, 2024
Browse files
load metric with `evaluate` (#2351)
parent
bc50a9aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
lm_eval/tasks/squadv2/task.py
lm_eval/tasks/squadv2/task.py
+3
-1
No files found.
lm_eval/tasks/squadv2/task.py
View file @
f378f306
...
@@ -37,7 +37,9 @@ _CITATION = """
...
@@ -37,7 +37,9 @@ _CITATION = """
def
_squad_metric
(
predictions
,
references
):
def
_squad_metric
(
predictions
,
references
):
squad_metric
=
datasets
.
load_metric
(
"squad_v2"
)
import
evaluate
squad_metric
=
evaluate
.
load
(
"squad_v2"
)
return
squad_metric
.
compute
(
predictions
=
predictions
,
references
=
references
)
return
squad_metric
.
compute
(
predictions
=
predictions
,
references
=
references
)
...
...
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