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
a38a0450
Commit
a38a0450
authored
Aug 21, 2023
by
lintangsutawika
Browse files
fix naming
parent
1cc2a764
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
lm_eval/tasks/wmt2016/metrics.py
lm_eval/tasks/wmt2016/metrics.py
+3
-4
No files found.
lm_eval/tasks/wmt2016/metrics.py
View file @
a38a0450
import
evaluate
def
bleu
(
predictions
,
references
):
rouge_fn
=
evaluate
.
load
(
'bleu'
)
results
=
rouge_fn
.
compute
(
predictions
=
predictions
,
references
=
references
)
return
results
[
'bleu'
]
def
bleu
(
references
,
predictions
):
bleu_fn
=
evaluate
.
load
(
'bleu'
)
return
bleu_fn
.
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