Spaces:
Sleeping
Sleeping
Check type before lowering string in list response.
Browse files- test_of_time_accuracy.py +1 -1
test_of_time_accuracy.py
CHANGED
|
@@ -249,7 +249,7 @@ class TestOfTimeAccuracy(evaluate.Metric):
|
|
| 249 |
if data:
|
| 250 |
first_key = next(iter(data.keys()))
|
| 251 |
if first_key in ["ordered_list", "unordered_list"] and isinstance(data[first_key], list):
|
| 252 |
-
data[first_key] = [item.lower() for item in data[first_key]]
|
| 253 |
|
| 254 |
return data
|
| 255 |
|
|
|
|
| 249 |
if data:
|
| 250 |
first_key = next(iter(data.keys()))
|
| 251 |
if first_key in ["ordered_list", "unordered_list"] and isinstance(data[first_key], list):
|
| 252 |
+
data[first_key] = [item.lower() for item in data[first_key] if isinstance(item, str)]
|
| 253 |
|
| 254 |
return data
|
| 255 |
|