Spaces:
Runtime error
Runtime error
Tristan Thrush
commited on
Commit
·
bceb306
1
Parent(s):
4a6b5ad
changed to use metric name instead of metric type only in autoeval case
Browse files
app.py
CHANGED
|
@@ -59,7 +59,14 @@ def parse_metrics_rows(meta, from_autoeval=False):
|
|
| 59 |
row["config"] = result["dataset"]["config"]
|
| 60 |
no_results = True
|
| 61 |
for metric in result["metrics"]:
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
if name in ("model_id", "dataset", "split", "config", "verified"):
|
| 64 |
# Metrics are not allowed to be named "dataset", "split", "config", or "verified".
|
| 65 |
continue
|
|
|
|
| 59 |
row["config"] = result["dataset"]["config"]
|
| 60 |
no_results = True
|
| 61 |
for metric in result["metrics"]:
|
| 62 |
+
|
| 63 |
+
# On autoeval cards, name is consistent. name seems less consistent than
|
| 64 |
+
# type for self-reported results on user model cards though.
|
| 65 |
+
if from_autoeval:
|
| 66 |
+
name = metric["name"].lower().strip()
|
| 67 |
+
else:
|
| 68 |
+
name = metric["type"].lower().strip()
|
| 69 |
+
|
| 70 |
if name in ("model_id", "dataset", "split", "config", "verified"):
|
| 71 |
# Metrics are not allowed to be named "dataset", "split", "config", or "verified".
|
| 72 |
continue
|