Spaces:
Sleeping
Sleeping
test edit
Browse files
semf1.py
CHANGED
@@ -339,6 +339,7 @@ class SemF1(evaluate.Metric):
|
|
339 |
gpu: DEVICE_TYPE = False,
|
340 |
batch_size: int = 32,
|
341 |
verbose: bool = False,
|
|
|
342 |
) -> List[Scores]:
|
343 |
"""
|
344 |
Compute precision, recall, and F1 scores for given predictions and references.
|
@@ -358,6 +359,7 @@ class SemF1(evaluate.Metric):
|
|
358 |
:param gpu: GPU device to use.
|
359 |
:param batch_size: Batch size for encoding.
|
360 |
:param verbose: Flag to indicate verbose output.
|
|
|
361 |
|
362 |
:return: List of Scores dataclass with precision, recall, and F1 scores.
|
363 |
"""
|
@@ -422,3 +424,4 @@ class SemF1(evaluate.Metric):
|
|
422 |
|
423 |
return results
|
424 |
|
|
|
|
339 |
gpu: DEVICE_TYPE = False,
|
340 |
batch_size: int = 32,
|
341 |
verbose: bool = False,
|
342 |
+
aggregate: bool = True,
|
343 |
) -> List[Scores]:
|
344 |
"""
|
345 |
Compute precision, recall, and F1 scores for given predictions and references.
|
|
|
359 |
:param gpu: GPU device to use.
|
360 |
:param batch_size: Batch size for encoding.
|
361 |
:param verbose: Flag to indicate verbose output.
|
362 |
+
:param aggregate: Flag to determine if output should be averaged
|
363 |
|
364 |
:return: List of Scores dataclass with precision, recall, and F1 scores.
|
365 |
"""
|
|
|
424 |
|
425 |
return results
|
426 |
|
427 |
+
# TEST
|