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
b7082722
Commit
b7082722
authored
Aug 25, 2023
by
lintangsutawika
Browse files
removed unused line
parent
5aec6f26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
3 deletions
+0
-3
lm_eval/tasks/super_glue/cb/t5_utils.py
lm_eval/tasks/super_glue/cb/t5_utils.py
+0
-3
No files found.
lm_eval/tasks/super_glue/cb/t5_utils.py
View file @
b7082722
...
@@ -16,7 +16,6 @@ def agg_mean_3class_f1(items):
...
@@ -16,7 +16,6 @@ def agg_mean_3class_f1(items):
"""Computes the unweighted average of the F1 per class."""
"""Computes the unweighted average of the F1 per class."""
metric_str
=
"fbeta_score"
metric_str
=
"fbeta_score"
metric_post_process_fn
=
lambda
x
:
x
metric_fn_kwargs
=
{
metric_fn_kwargs
=
{
"beta"
:
1
,
"beta"
:
1
,
"labels"
:
range
(
3
),
"labels"
:
range
(
3
),
...
@@ -26,8 +25,6 @@ def agg_mean_3class_f1(items):
...
@@ -26,8 +25,6 @@ def agg_mean_3class_f1(items):
def
_fn
(
predictions
,
references
):
def
_fn
(
predictions
,
references
):
metric_fn
=
getattr
(
sklearn
.
metrics
,
metric_str
)
metric_fn
=
getattr
(
sklearn
.
metrics
,
metric_str
)
metric_val
=
metric_fn
(
references
,
predictions
,
**
metric_fn_kwargs
)
metric_val
=
metric_fn
(
references
,
predictions
,
**
metric_fn_kwargs
)
if
metric_post_process_fn
is
not
None
:
metric_val
=
metric_post_process_fn
(
metric_val
)
return
metric_val
return
metric_val
return
_fn
(
predictions
,
references
)
return
_fn
(
predictions
,
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