Datasets:
Add files using upload-large-folder tool
Browse files- MixBench25.py +4 -4
MixBench25.py
CHANGED
|
@@ -145,14 +145,14 @@ class MixBench(datasets.GeneratorBasedBuilder):
|
|
| 145 |
if split == "query":
|
| 146 |
yield idx, {
|
| 147 |
"query_id": row["query_id"],
|
| 148 |
-
"text": row
|
| 149 |
-
"image": row
|
| 150 |
}
|
| 151 |
else: # corpus or mixed_corpus
|
| 152 |
yield idx, {
|
| 153 |
"corpus_id": row["corpus_id"],
|
| 154 |
-
"text": row
|
| 155 |
-
"image": row
|
| 156 |
}
|
| 157 |
|
| 158 |
def _info(self):
|
|
|
|
| 145 |
if split == "query":
|
| 146 |
yield idx, {
|
| 147 |
"query_id": row["query_id"],
|
| 148 |
+
"text": row.get("text", ""),
|
| 149 |
+
"image": row.get("image", ""),
|
| 150 |
}
|
| 151 |
else: # corpus or mixed_corpus
|
| 152 |
yield idx, {
|
| 153 |
"corpus_id": row["corpus_id"],
|
| 154 |
+
"text": row.get("text", ""),
|
| 155 |
+
"image": row.get("image", ""),
|
| 156 |
}
|
| 157 |
|
| 158 |
def _info(self):
|