Upload metric.py with huggingface_hub
Browse files
metric.py
CHANGED
@@ -30,8 +30,8 @@ from .operator import (
|
|
30 |
)
|
31 |
from .operator import __file__ as _
|
32 |
from .operators import (
|
|
|
33 |
ApplyStreamOperatorsField,
|
34 |
-
ApplyValueOperatorsField,
|
35 |
FlattenInstances,
|
36 |
MergeStreams,
|
37 |
SplitByValue,
|
@@ -101,8 +101,10 @@ class MetricRecipe(SequntialOperatorInitilizer):
|
|
101 |
register_all_artifacts()
|
102 |
self.steps = [
|
103 |
FromPredictionsAndOriginalData(),
|
104 |
-
|
105 |
-
|
|
|
|
|
106 |
),
|
107 |
SplitByValue(["group"]),
|
108 |
ApplyStreamOperatorsField(
|
|
|
30 |
)
|
31 |
from .operator import __file__ as _
|
32 |
from .operators import (
|
33 |
+
ApplyOperatorsField,
|
34 |
ApplyStreamOperatorsField,
|
|
|
35 |
FlattenInstances,
|
36 |
MergeStreams,
|
37 |
SplitByValue,
|
|
|
101 |
register_all_artifacts()
|
102 |
self.steps = [
|
103 |
FromPredictionsAndOriginalData(),
|
104 |
+
ApplyOperatorsField(
|
105 |
+
inputs_fields=["prediction", "references"],
|
106 |
+
operators_field="postprocessors",
|
107 |
+
default_operators=["processors.to_string"],
|
108 |
),
|
109 |
SplitByValue(["group"]),
|
110 |
ApplyStreamOperatorsField(
|