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
cb979e6c
Commit
cb979e6c
authored
May 15, 2024
by
Israel Abebe Azime
Browse files
modefied mgsm
parent
facf38ca
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
9 deletions
+0
-9
lm_eval/tasks/afrimgsm/direct/utils.py
lm_eval/tasks/afrimgsm/direct/utils.py
+0
-9
No files found.
lm_eval/tasks/afrimgsm/direct/utils.py
deleted
100644 → 0
View file @
facf38ca
from
sklearn.metrics
import
f1_score
def
weighted_f1_score
(
items
):
unzipped_list
=
list
(
zip
(
*
items
))
golds
=
unzipped_list
[
0
]
preds
=
unzipped_list
[
1
]
fscore
=
f1_score
(
golds
,
preds
,
average
=
"weighted"
)
return
fscore
\ No newline at end of file
Prev
1
2
Next
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