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
OpenDAS
opencompass
Commits
a1782f9a
Unverified
Commit
a1782f9a
authored
Sep 04, 2023
by
Leymore
Committed by
GitHub
Sep 04, 2023
Browse files
[Fix] triviaqa & nq postprocess (#350)
parent
ce65d339
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
opencompass/datasets/natural_question.py
opencompass/datasets/natural_question.py
+1
-1
opencompass/datasets/triviaqa.py
opencompass/datasets/triviaqa.py
+1
-1
No files found.
opencompass/datasets/natural_question.py
View file @
a1782f9a
...
...
@@ -44,7 +44,7 @@ class NQEvaluator(BaseEvaluator):
}
processed_predictions
=
[]
for
prediction
in
predictions
:
prediction
=
prediction
.
split
(
'
\n
'
)[
0
].
lower
()
prediction
=
prediction
.
strip
().
split
(
'
\n
'
)[
0
].
lower
()
if
'answer is'
in
prediction
:
prediction
=
prediction
.
split
(
'answer is'
)[
-
1
]
prediction
=
general_postprocess
(
prediction
)
...
...
opencompass/datasets/triviaqa.py
View file @
a1782f9a
...
...
@@ -43,7 +43,7 @@ class TriviaQAEvaluator(BaseEvaluator):
}
processed_predictions
=
[]
for
prediction
in
predictions
:
prediction
=
prediction
.
split
(
'
\n
'
)[
0
].
lower
()
prediction
=
prediction
.
strip
().
split
(
'
\n
'
)[
0
].
lower
()
if
'answer is'
in
prediction
:
prediction
=
prediction
.
split
(
'answer is'
)[
-
1
]
prediction
=
general_postprocess
(
prediction
)
...
...
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