Update MMSearch-Plus dataset with encrypted data files
Browse files- dataset_info.json +18 -39
- mmsearch_plus.py +7 -3
- state.json +3 -6
dataset_info.json
CHANGED
|
@@ -2,37 +2,11 @@
|
|
| 2 |
"citation": "",
|
| 3 |
"description": "",
|
| 4 |
"features": {
|
| 5 |
-
"num_images": {
|
| 6 |
-
"dtype": "int64",
|
| 7 |
-
"_type": "Value"
|
| 8 |
-
},
|
| 9 |
-
"difficulty": {
|
| 10 |
-
"dtype": "string",
|
| 11 |
-
"_type": "Value"
|
| 12 |
-
},
|
| 13 |
-
"img_5": {
|
| 14 |
-
"dtype": "string",
|
| 15 |
-
"_type": "Value"
|
| 16 |
-
},
|
| 17 |
"img_3": {
|
| 18 |
-
"
|
| 19 |
-
"_type": "Value"
|
| 20 |
-
},
|
| 21 |
-
"question": {
|
| 22 |
-
"dtype": "string",
|
| 23 |
-
"_type": "Value"
|
| 24 |
-
},
|
| 25 |
-
"img_4": {
|
| 26 |
-
"dtype": "string",
|
| 27 |
-
"_type": "Value"
|
| 28 |
-
},
|
| 29 |
-
"encrypted_img_1": {
|
| 30 |
-
"dtype": "string",
|
| 31 |
-
"_type": "Value"
|
| 32 |
},
|
| 33 |
-
"
|
| 34 |
-
"
|
| 35 |
-
"_type": "Value"
|
| 36 |
},
|
| 37 |
"answer": {
|
| 38 |
"feature": {
|
|
@@ -45,31 +19,36 @@
|
|
| 45 |
"dtype": "string",
|
| 46 |
"_type": "Value"
|
| 47 |
},
|
| 48 |
-
"
|
| 49 |
"dtype": "string",
|
| 50 |
"_type": "Value"
|
| 51 |
},
|
| 52 |
-
"
|
| 53 |
-
"
|
| 54 |
-
"_type": "Value"
|
| 55 |
},
|
| 56 |
-
"
|
| 57 |
"dtype": "string",
|
| 58 |
"_type": "Value"
|
| 59 |
},
|
| 60 |
-
"
|
|
|
|
|
|
|
|
|
|
| 61 |
"dtype": "string",
|
| 62 |
"_type": "Value"
|
| 63 |
},
|
| 64 |
-
"
|
| 65 |
"dtype": "string",
|
| 66 |
"_type": "Value"
|
| 67 |
},
|
| 68 |
-
"
|
| 69 |
-
"
|
|
|
|
|
|
|
|
|
|
| 70 |
"_type": "Value"
|
| 71 |
},
|
| 72 |
-
"
|
| 73 |
"dtype": "string",
|
| 74 |
"_type": "Value"
|
| 75 |
}
|
|
|
|
| 2 |
"citation": "",
|
| 3 |
"description": "",
|
| 4 |
"features": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"img_3": {
|
| 6 |
+
"_type": "Image"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
},
|
| 8 |
+
"img_2": {
|
| 9 |
+
"_type": "Image"
|
|
|
|
| 10 |
},
|
| 11 |
"answer": {
|
| 12 |
"feature": {
|
|
|
|
| 19 |
"dtype": "string",
|
| 20 |
"_type": "Value"
|
| 21 |
},
|
| 22 |
+
"subtask": {
|
| 23 |
"dtype": "string",
|
| 24 |
"_type": "Value"
|
| 25 |
},
|
| 26 |
+
"img_4": {
|
| 27 |
+
"_type": "Image"
|
|
|
|
| 28 |
},
|
| 29 |
+
"arxiv_id": {
|
| 30 |
"dtype": "string",
|
| 31 |
"_type": "Value"
|
| 32 |
},
|
| 33 |
+
"img_1": {
|
| 34 |
+
"_type": "Image"
|
| 35 |
+
},
|
| 36 |
+
"difficulty": {
|
| 37 |
"dtype": "string",
|
| 38 |
"_type": "Value"
|
| 39 |
},
|
| 40 |
+
"question": {
|
| 41 |
"dtype": "string",
|
| 42 |
"_type": "Value"
|
| 43 |
},
|
| 44 |
+
"img_5": {
|
| 45 |
+
"_type": "Image"
|
| 46 |
+
},
|
| 47 |
+
"num_images": {
|
| 48 |
+
"dtype": "int64",
|
| 49 |
"_type": "Value"
|
| 50 |
},
|
| 51 |
+
"video_url": {
|
| 52 |
"dtype": "string",
|
| 53 |
"_type": "Value"
|
| 54 |
}
|
mmsearch_plus.py
CHANGED
|
@@ -172,10 +172,14 @@ class MmsearchPlus(datasets.GeneratorBasedBuilder):
|
|
| 172 |
for idx in range(len(arrow_dataset)):
|
| 173 |
example = arrow_dataset[idx]
|
| 174 |
|
| 175 |
-
# Decrypt text fields
|
| 176 |
-
|
| 177 |
-
example["question"] = decrypt_text(example["question"], canary)
|
| 178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
if example.get("answer"):
|
| 180 |
decrypted_answers = []
|
| 181 |
for answer in example["answer"]:
|
|
|
|
| 172 |
for idx in range(len(arrow_dataset)):
|
| 173 |
example = arrow_dataset[idx]
|
| 174 |
|
| 175 |
+
# Decrypt text fields - matches encryption script fields
|
| 176 |
+
text_fields = ['question', 'video_url', 'arxiv_id']
|
|
|
|
| 177 |
|
| 178 |
+
for field in text_fields:
|
| 179 |
+
if example.get(field):
|
| 180 |
+
example[field] = decrypt_text(example[field], canary)
|
| 181 |
+
|
| 182 |
+
# Handle answer field (list of strings)
|
| 183 |
if example.get("answer"):
|
| 184 |
decrypted_answers = []
|
| 185 |
for answer in example["answer"]:
|
state.json
CHANGED
|
@@ -1,16 +1,13 @@
|
|
| 1 |
{
|
| 2 |
"_data_files": [
|
| 3 |
{
|
| 4 |
-
"filename": "data-00000-of-
|
| 5 |
},
|
| 6 |
{
|
| 7 |
-
"filename": "data-00001-of-
|
| 8 |
-
},
|
| 9 |
-
{
|
| 10 |
-
"filename": "data-00002-of-00003.arrow"
|
| 11 |
}
|
| 12 |
],
|
| 13 |
-
"_fingerprint": "
|
| 14 |
"_format_columns": null,
|
| 15 |
"_format_kwargs": {},
|
| 16 |
"_format_type": null,
|
|
|
|
| 1 |
{
|
| 2 |
"_data_files": [
|
| 3 |
{
|
| 4 |
+
"filename": "data-00000-of-00002.arrow"
|
| 5 |
},
|
| 6 |
{
|
| 7 |
+
"filename": "data-00001-of-00002.arrow"
|
|
|
|
|
|
|
|
|
|
| 8 |
}
|
| 9 |
],
|
| 10 |
+
"_fingerprint": "a72a3baa35987582",
|
| 11 |
"_format_columns": null,
|
| 12 |
"_format_kwargs": {},
|
| 13 |
"_format_type": null,
|