Spaces:
Running
Running
Update Space (evaluate main: c447fc8e)
Browse files- glue.py +20 -18
- requirements.txt +1 -1
glue.py
CHANGED
|
@@ -104,28 +104,30 @@ def pearson_and_spearman(preds, labels):
|
|
| 104 |
|
| 105 |
@evaluate.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
|
| 106 |
class Glue(evaluate.Metric):
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
|
|
|
|
|
|
|
|
|
| 124 |
return evaluate.MetricInfo(
|
| 125 |
description=_DESCRIPTION,
|
| 126 |
citation=_CITATION,
|
| 127 |
inputs_description=_KWARGS_DESCRIPTION,
|
| 128 |
-
config=config,
|
| 129 |
features=datasets.Features(
|
| 130 |
{
|
| 131 |
"predictions": datasets.Value("int64" if self.config_name != "stsb" else "float32"),
|
|
|
|
| 104 |
|
| 105 |
@evaluate.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
|
| 106 |
class Glue(evaluate.Metric):
|
| 107 |
+
def _info(self):
|
| 108 |
+
if self.config_name not in [
|
| 109 |
+
"sst2",
|
| 110 |
+
"mnli",
|
| 111 |
+
"mnli_mismatched",
|
| 112 |
+
"mnli_matched",
|
| 113 |
+
"cola",
|
| 114 |
+
"stsb",
|
| 115 |
+
"mrpc",
|
| 116 |
+
"qqp",
|
| 117 |
+
"qnli",
|
| 118 |
+
"rte",
|
| 119 |
+
"wnli",
|
| 120 |
+
"hans",
|
| 121 |
+
]:
|
| 122 |
+
raise KeyError(
|
| 123 |
+
"You should supply a configuration name selected in "
|
| 124 |
+
'["sst2", "mnli", "mnli_mismatched", "mnli_matched", '
|
| 125 |
+
'"cola", "stsb", "mrpc", "qqp", "qnli", "rte", "wnli", "hans"]'
|
| 126 |
+
)
|
| 127 |
return evaluate.MetricInfo(
|
| 128 |
description=_DESCRIPTION,
|
| 129 |
citation=_CITATION,
|
| 130 |
inputs_description=_KWARGS_DESCRIPTION,
|
|
|
|
| 131 |
features=datasets.Features(
|
| 132 |
{
|
| 133 |
"predictions": datasets.Value("int64" if self.config_name != "stsb" else "float32"),
|
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
|