Upload metric.py with huggingface_hub
Browse files
metric.py
CHANGED
@@ -37,6 +37,7 @@ from .operators import __file__ as _
|
|
37 |
from .processors import __file__ as _
|
38 |
from .recipe import __file__ as _
|
39 |
from .register import __file__ as _
|
|
|
40 |
from .schema import __file__ as _
|
41 |
from .split_utils import __file__ as _
|
42 |
from .splitters import __file__ as _
|
@@ -45,6 +46,7 @@ from .stream import __file__ as _
|
|
45 |
from .task import __file__ as _
|
46 |
from .templates import __file__ as _
|
47 |
from .text_utils import __file__ as _
|
|
|
48 |
from .validate import __file__ as _
|
49 |
|
50 |
|
@@ -90,10 +92,11 @@ from .schema import UNITXT_DATASET_SCHEMA
|
|
90 |
|
91 |
class MetricRecipe(SequntialOperatorInitilizer):
|
92 |
def prepare(self):
|
|
|
93 |
self.steps = [
|
94 |
FromPredictionsAndOriginalData(),
|
95 |
ApplyValueOperatorsField(
|
96 |
-
value_field="prediction", operators_field="processors", default_operators=["to_string"]
|
97 |
),
|
98 |
SplitByValue(["group"]),
|
99 |
ApplyStreamOperatorsField(
|
|
|
37 |
from .processors import __file__ as _
|
38 |
from .recipe import __file__ as _
|
39 |
from .register import __file__ as _
|
40 |
+
from .register import register_all_artifacts
|
41 |
from .schema import __file__ as _
|
42 |
from .split_utils import __file__ as _
|
43 |
from .splitters import __file__ as _
|
|
|
46 |
from .task import __file__ as _
|
47 |
from .templates import __file__ as _
|
48 |
from .text_utils import __file__ as _
|
49 |
+
from .utils import __file__ as _
|
50 |
from .validate import __file__ as _
|
51 |
|
52 |
|
|
|
92 |
|
93 |
class MetricRecipe(SequntialOperatorInitilizer):
|
94 |
def prepare(self):
|
95 |
+
register_all_artifacts()
|
96 |
self.steps = [
|
97 |
FromPredictionsAndOriginalData(),
|
98 |
ApplyValueOperatorsField(
|
99 |
+
value_field="prediction", operators_field="processors", default_operators=["processors::to_string"]
|
100 |
),
|
101 |
SplitByValue(["group"]),
|
102 |
ApplyStreamOperatorsField(
|