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
5a62765b
Commit
5a62765b
authored
Apr 28, 2022
by
Zdenek Kasner
Browse files
Revert changes in base.py
parent
56b2aa94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/base.py
lm_eval/base.py
+2
-2
No files found.
lm_eval/base.py
View file @
5a62765b
...
...
@@ -768,7 +768,7 @@ class PromptSourceTask(Task):
metric
in
self
.
CONFIGURED_PS_METRICS
),
"Unexpected metric. Add it, or use a task-specific solution."
if
metric
==
"BLEU"
:
out
[
"bleu"
]
=
metrics
.
bleu
([
(
target
,
pred
)
])
out
[
"bleu"
]
=
(
target
,
pred
)
if
metric
==
"ROUGE"
:
# TODO: This computes all rouge sub-metrics. Find a generic
# way to handle user specified rouge sub-metrics to avoid extra
...
...
@@ -819,7 +819,7 @@ class PromptSourceTask(Task):
if
metric
==
"Accuracy"
:
out
[
"acc"
]
=
mean
if
metric
==
"BLEU"
:
out
[
"bleu"
]
=
me
an
out
[
"bleu"
]
=
me
trics
.
bleu
if
metric
==
"ROUGE"
:
# TODO: Find a generic way to handle user specified rouge metrics.
out
[
"rouge1_precision"
]
=
mean
...
...
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