Spaces:
Running
Running
Update Space (evaluate main: c447fc8e)
Browse files- indic_glue.py +22 -19
- requirements.txt +1 -1
indic_glue.py
CHANGED
@@ -104,29 +104,32 @@ def precision_at_10(en_sentvecs, in_sentvecs):
|
|
104 |
|
105 |
@evaluate.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
|
106 |
class IndicGlue(evaluate.Metric):
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
125 |
return evaluate.MetricInfo(
|
126 |
description=_DESCRIPTION,
|
127 |
citation=_CITATION,
|
128 |
inputs_description=_KWARGS_DESCRIPTION,
|
129 |
-
config=config,
|
130 |
features=datasets.Features(
|
131 |
{
|
132 |
"predictions": datasets.Value("int64")
|
|
|
104 |
|
105 |
@evaluate.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
|
106 |
class IndicGlue(evaluate.Metric):
|
107 |
+
def _info(self):
|
108 |
+
if self.config_name not in [
|
109 |
+
"wnli",
|
110 |
+
"copa",
|
111 |
+
"sna",
|
112 |
+
"csqa",
|
113 |
+
"wstp",
|
114 |
+
"inltkh",
|
115 |
+
"bbca",
|
116 |
+
"cvit-mkb-clsr",
|
117 |
+
"iitp-mr",
|
118 |
+
"iitp-pr",
|
119 |
+
"actsa-sc",
|
120 |
+
"md",
|
121 |
+
"wiki-ner",
|
122 |
+
]:
|
123 |
+
raise KeyError(
|
124 |
+
"You should supply a configuration name selected in "
|
125 |
+
'["wnli", "copa", "sna", "csqa", "wstp", "inltkh", "bbca", '
|
126 |
+
'"cvit-mkb-clsr", "iitp-mr", "iitp-pr", "actsa-sc", "md", '
|
127 |
+
'"wiki-ner"]'
|
128 |
+
)
|
129 |
return evaluate.MetricInfo(
|
130 |
description=_DESCRIPTION,
|
131 |
citation=_CITATION,
|
132 |
inputs_description=_KWARGS_DESCRIPTION,
|
|
|
133 |
features=datasets.Features(
|
134 |
{
|
135 |
"predictions": datasets.Value("int64")
|
requirements.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
git+https://github.com/huggingface/evaluate@
|
2 |
scipy
|
3 |
sklearn
|
|
|
1 |
+
git+https://github.com/huggingface/evaluate@c447fc8eda9c62af501bfdc6988919571050d950
|
2 |
scipy
|
3 |
sklearn
|