update
Browse files- .ipynb_checkpoints/AVA-checkpoint.py +2 -2
- AVA.py +2 -2
- notebooks/Test.ipynb +75 -6
.ipynb_checkpoints/AVA-checkpoint.py
CHANGED
@@ -60,8 +60,8 @@ class AVA(datasets.GeneratorBasedBuilder):
|
|
60 |
_metadata = self.dict_metadata[_id]
|
61 |
ex = {"image": {"path": path, "bytes": file.read()},
|
62 |
"rating_counts": _metadata[0],
|
63 |
-
"
|
64 |
-
"
|
65 |
yield idx, ex
|
66 |
idx += 1
|
67 |
|
|
|
60 |
_metadata = self.dict_metadata[_id]
|
61 |
ex = {"image": {"path": path, "bytes": file.read()},
|
62 |
"rating_counts": _metadata[0],
|
63 |
+
"text_tag_0":_metadata[1],
|
64 |
+
"text_tag_1": _metadata[2]}
|
65 |
yield idx, ex
|
66 |
idx += 1
|
67 |
|
AVA.py
CHANGED
@@ -60,8 +60,8 @@ class AVA(datasets.GeneratorBasedBuilder):
|
|
60 |
_metadata = self.dict_metadata[_id]
|
61 |
ex = {"image": {"path": path, "bytes": file.read()},
|
62 |
"rating_counts": _metadata[0],
|
63 |
-
"
|
64 |
-
"
|
65 |
yield idx, ex
|
66 |
idx += 1
|
67 |
|
|
|
60 |
_metadata = self.dict_metadata[_id]
|
61 |
ex = {"image": {"path": path, "bytes": file.read()},
|
62 |
"rating_counts": _metadata[0],
|
63 |
+
"text_tag_0":_metadata[1],
|
64 |
+
"text_tag_1": _metadata[2]}
|
65 |
yield idx, ex
|
66 |
idx += 1
|
67 |
|
notebooks/Test.ipynb
CHANGED
@@ -12,19 +12,19 @@
|
|
12 |
},
|
13 |
{
|
14 |
"cell_type": "code",
|
15 |
-
"execution_count":
|
16 |
"id": "c0ed6498",
|
17 |
"metadata": {},
|
18 |
"outputs": [
|
19 |
{
|
20 |
"data": {
|
21 |
"application/vnd.jupyter.widget-view+json": {
|
22 |
-
"model_id": "
|
23 |
"version_major": 2,
|
24 |
"version_minor": 0
|
25 |
},
|
26 |
"text/plain": [
|
27 |
-
"Downloading builder script: 0%| | 0.00/2.
|
28 |
]
|
29 |
},
|
30 |
"metadata": {},
|
@@ -34,13 +34,13 @@
|
|
34 |
"name": "stdout",
|
35 |
"output_type": "stream",
|
36 |
"text": [
|
37 |
-
"Downloading and preparing dataset ava/default to /home/william/.cache/huggingface/datasets/will33am___ava/default/1.0.0/
|
38 |
]
|
39 |
},
|
40 |
{
|
41 |
"data": {
|
42 |
"application/vnd.jupyter.widget-view+json": {
|
43 |
-
"model_id": "
|
44 |
"version_major": 2,
|
45 |
"version_minor": 0
|
46 |
},
|
@@ -50,6 +50,75 @@
|
|
50 |
},
|
51 |
"metadata": {},
|
52 |
"output_type": "display_data"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
],
|
55 |
"source": [
|
@@ -60,7 +129,7 @@
|
|
60 |
{
|
61 |
"cell_type": "code",
|
62 |
"execution_count": null,
|
63 |
-
"id": "
|
64 |
"metadata": {},
|
65 |
"outputs": [],
|
66 |
"source": []
|
|
|
12 |
},
|
13 |
{
|
14 |
"cell_type": "code",
|
15 |
+
"execution_count": 2,
|
16 |
"id": "c0ed6498",
|
17 |
"metadata": {},
|
18 |
"outputs": [
|
19 |
{
|
20 |
"data": {
|
21 |
"application/vnd.jupyter.widget-view+json": {
|
22 |
+
"model_id": "cd5f00716a7c42bd9962e71e5585e952",
|
23 |
"version_major": 2,
|
24 |
"version_minor": 0
|
25 |
},
|
26 |
"text/plain": [
|
27 |
+
"Downloading builder script: 0%| | 0.00/2.17k [00:00<?, ?B/s]"
|
28 |
]
|
29 |
},
|
30 |
"metadata": {},
|
|
|
34 |
"name": "stdout",
|
35 |
"output_type": "stream",
|
36 |
"text": [
|
37 |
+
"Downloading and preparing dataset ava/default to /home/william/.cache/huggingface/datasets/will33am___ava/default/1.0.0/7f76b3807b4156161ed44f936b3e89ecbab31823986cc11c2a46b584b358197b...\n"
|
38 |
]
|
39 |
},
|
40 |
{
|
41 |
"data": {
|
42 |
"application/vnd.jupyter.widget-view+json": {
|
43 |
+
"model_id": "40ff2d92e7a24fe4a1c169bb467e5dbc",
|
44 |
"version_major": 2,
|
45 |
"version_minor": 0
|
46 |
},
|
|
|
50 |
},
|
51 |
"metadata": {},
|
52 |
"output_type": "display_data"
|
53 |
+
},
|
54 |
+
{
|
55 |
+
"name": "stderr",
|
56 |
+
"output_type": "stream",
|
57 |
+
"text": [
|
58 |
+
"Computing checksums of downloaded files. They can be used for integrity verification. You can disable this by passing ignore_verifications=True to load_dataset\n"
|
59 |
+
]
|
60 |
+
},
|
61 |
+
{
|
62 |
+
"data": {
|
63 |
+
"application/vnd.jupyter.widget-view+json": {
|
64 |
+
"model_id": "706a2a08eb364f0790c22a1a3ae053fe",
|
65 |
+
"version_major": 2,
|
66 |
+
"version_minor": 0
|
67 |
+
},
|
68 |
+
"text/plain": [
|
69 |
+
"Computing checksums: 100%|##########| 1/1 [01:33<00:00, 93.75s/it]"
|
70 |
+
]
|
71 |
+
},
|
72 |
+
"metadata": {},
|
73 |
+
"output_type": "display_data"
|
74 |
+
},
|
75 |
+
{
|
76 |
+
"data": {
|
77 |
+
"application/vnd.jupyter.widget-view+json": {
|
78 |
+
"model_id": "5133a8f32d5a44829a7e2e1df96b3216",
|
79 |
+
"version_major": 2,
|
80 |
+
"version_minor": 0
|
81 |
+
},
|
82 |
+
"text/plain": [
|
83 |
+
"Generating train split: 0 examples [00:00, ? examples/s]"
|
84 |
+
]
|
85 |
+
},
|
86 |
+
"metadata": {},
|
87 |
+
"output_type": "display_data"
|
88 |
+
},
|
89 |
+
{
|
90 |
+
"name": "stderr",
|
91 |
+
"output_type": "stream",
|
92 |
+
"text": [
|
93 |
+
"\n",
|
94 |
+
"0it [00:00, ?it/s]\u001b[A"
|
95 |
+
]
|
96 |
+
},
|
97 |
+
{
|
98 |
+
"ename": "DatasetGenerationError",
|
99 |
+
"evalue": "An error occurred while generating the dataset",
|
100 |
+
"output_type": "error",
|
101 |
+
"traceback": [
|
102 |
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
103 |
+
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
104 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/builder.py:1587\u001b[0m, in \u001b[0;36mGeneratorBasedBuilder._prepare_split_single\u001b[0;34m(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)\u001b[0m\n\u001b[1;32m 1578\u001b[0m writer \u001b[38;5;241m=\u001b[39m writer_class(\n\u001b[1;32m 1579\u001b[0m features\u001b[38;5;241m=\u001b[39mwriter\u001b[38;5;241m.\u001b[39m_features,\n\u001b[1;32m 1580\u001b[0m path\u001b[38;5;241m=\u001b[39mfpath\u001b[38;5;241m.\u001b[39mreplace(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mSSSSS\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mshard_id\u001b[38;5;132;01m:\u001b[39;00m\u001b[38;5;124m05d\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\u001b[38;5;241m.\u001b[39mreplace(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mJJJJJ\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mjob_id\u001b[38;5;132;01m:\u001b[39;00m\u001b[38;5;124m05d\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m),\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 1585\u001b[0m embed_local_files\u001b[38;5;241m=\u001b[39membed_local_files,\n\u001b[1;32m 1586\u001b[0m )\n\u001b[0;32m-> 1587\u001b[0m example \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minfo\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfeatures\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mencode_example\u001b[49m\u001b[43m(\u001b[49m\u001b[43mrecord\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minfo\u001b[38;5;241m.\u001b[39mfeatures \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m record\n\u001b[1;32m 1588\u001b[0m writer\u001b[38;5;241m.\u001b[39mwrite(example, key)\n",
|
105 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/features/features.py:1800\u001b[0m, in \u001b[0;36mFeatures.encode_example\u001b[0;34m(self, example)\u001b[0m\n\u001b[1;32m 1799\u001b[0m example \u001b[38;5;241m=\u001b[39m cast_to_python_objects(example)\n\u001b[0;32m-> 1800\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mencode_nested_example\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mexample\u001b[49m\u001b[43m)\u001b[49m\n",
|
106 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/features/features.py:1202\u001b[0m, in \u001b[0;36mencode_nested_example\u001b[0;34m(schema, obj, level)\u001b[0m\n\u001b[1;32m 1200\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mGot None but expected a dictionary instead\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 1201\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m (\n\u001b[0;32m-> 1202\u001b[0m {\n\u001b[1;32m 1203\u001b[0m k: encode_nested_example(sub_schema, sub_obj, level\u001b[38;5;241m=\u001b[39mlevel \u001b[38;5;241m+\u001b[39m \u001b[38;5;241m1\u001b[39m)\n\u001b[1;32m 1204\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m k, (sub_schema, sub_obj) \u001b[38;5;129;01min\u001b[39;00m zip_dict(schema, obj)\n\u001b[1;32m 1205\u001b[0m }\n\u001b[1;32m 1206\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m obj \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1207\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1208\u001b[0m )\n\u001b[1;32m 1210\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(schema, (\u001b[38;5;28mlist\u001b[39m, \u001b[38;5;28mtuple\u001b[39m)):\n",
|
107 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/features/features.py:1202\u001b[0m, in \u001b[0;36m<dictcomp>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 1200\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mGot None but expected a dictionary instead\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 1201\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m (\n\u001b[0;32m-> 1202\u001b[0m {\n\u001b[1;32m 1203\u001b[0m k: encode_nested_example(sub_schema, sub_obj, level\u001b[38;5;241m=\u001b[39mlevel \u001b[38;5;241m+\u001b[39m \u001b[38;5;241m1\u001b[39m)\n\u001b[1;32m 1204\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m k, (sub_schema, sub_obj) \u001b[38;5;129;01min\u001b[39;00m zip_dict(schema, obj)\n\u001b[1;32m 1205\u001b[0m }\n\u001b[1;32m 1206\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m obj \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1207\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1208\u001b[0m )\n\u001b[1;32m 1210\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(schema, (\u001b[38;5;28mlist\u001b[39m, \u001b[38;5;28mtuple\u001b[39m)):\n",
|
108 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/utils/py_utils.py:302\u001b[0m, in \u001b[0;36mzip_dict\u001b[0;34m(*dicts)\u001b[0m\n\u001b[1;32m 300\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m key \u001b[38;5;129;01min\u001b[39;00m unique_values(itertools\u001b[38;5;241m.\u001b[39mchain(\u001b[38;5;241m*\u001b[39mdicts)): \u001b[38;5;66;03m# set merge all keys\u001b[39;00m\n\u001b[1;32m 301\u001b[0m \u001b[38;5;66;03m# Will raise KeyError if the dict don't have the same keys\u001b[39;00m\n\u001b[0;32m--> 302\u001b[0m \u001b[38;5;28;01myield\u001b[39;00m key, \u001b[38;5;28;43mtuple\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43md\u001b[49m\u001b[43m[\u001b[49m\u001b[43mkey\u001b[49m\u001b[43m]\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mfor\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43md\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01min\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mdicts\u001b[49m\u001b[43m)\u001b[49m\n",
|
109 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/utils/py_utils.py:302\u001b[0m, in \u001b[0;36m<genexpr>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 300\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m key \u001b[38;5;129;01min\u001b[39;00m unique_values(itertools\u001b[38;5;241m.\u001b[39mchain(\u001b[38;5;241m*\u001b[39mdicts)): \u001b[38;5;66;03m# set merge all keys\u001b[39;00m\n\u001b[1;32m 301\u001b[0m \u001b[38;5;66;03m# Will raise KeyError if the dict don't have the same keys\u001b[39;00m\n\u001b[0;32m--> 302\u001b[0m \u001b[38;5;28;01myield\u001b[39;00m key, \u001b[38;5;28mtuple\u001b[39m(\u001b[43md\u001b[49m\u001b[43m[\u001b[49m\u001b[43mkey\u001b[49m\u001b[43m]\u001b[49m \u001b[38;5;28;01mfor\u001b[39;00m d \u001b[38;5;129;01min\u001b[39;00m dicts)\n",
|
110 |
+
"\u001b[0;31mKeyError\u001b[0m: 'text_tag_0'",
|
111 |
+
"\nThe above exception was the direct cause of the following exception:\n",
|
112 |
+
"\u001b[0;31mDatasetGenerationError\u001b[0m Traceback (most recent call last)",
|
113 |
+
"File \u001b[0;32m<timed exec>:1\u001b[0m\n",
|
114 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/load.py:1757\u001b[0m, in \u001b[0;36mload_dataset\u001b[0;34m(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, **config_kwargs)\u001b[0m\n\u001b[1;32m 1754\u001b[0m try_from_hf_gcs \u001b[38;5;241m=\u001b[39m path \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m _PACKAGED_DATASETS_MODULES\n\u001b[1;32m 1756\u001b[0m \u001b[38;5;66;03m# Download and prepare data\u001b[39;00m\n\u001b[0;32m-> 1757\u001b[0m \u001b[43mbuilder_instance\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdownload_and_prepare\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1758\u001b[0m \u001b[43m \u001b[49m\u001b[43mdownload_config\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownload_config\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1759\u001b[0m \u001b[43m \u001b[49m\u001b[43mdownload_mode\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdownload_mode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1760\u001b[0m \u001b[43m \u001b[49m\u001b[43mignore_verifications\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mignore_verifications\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1761\u001b[0m \u001b[43m \u001b[49m\u001b[43mtry_from_hf_gcs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtry_from_hf_gcs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1762\u001b[0m \u001b[43m \u001b[49m\u001b[43mnum_proc\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mnum_proc\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1763\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1765\u001b[0m \u001b[38;5;66;03m# Build dataset for splits\u001b[39;00m\n\u001b[1;32m 1766\u001b[0m keep_in_memory \u001b[38;5;241m=\u001b[39m (\n\u001b[1;32m 1767\u001b[0m keep_in_memory \u001b[38;5;28;01mif\u001b[39;00m keep_in_memory \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m is_small_dataset(builder_instance\u001b[38;5;241m.\u001b[39minfo\u001b[38;5;241m.\u001b[39mdataset_size)\n\u001b[1;32m 1768\u001b[0m )\n",
|
115 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/builder.py:860\u001b[0m, in \u001b[0;36mDatasetBuilder.download_and_prepare\u001b[0;34m(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)\u001b[0m\n\u001b[1;32m 858\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m num_proc \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 859\u001b[0m prepare_split_kwargs[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnum_proc\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m num_proc\n\u001b[0;32m--> 860\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_download_and_prepare\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 861\u001b[0m \u001b[43m \u001b[49m\u001b[43mdl_manager\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdl_manager\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 862\u001b[0m \u001b[43m \u001b[49m\u001b[43mverify_infos\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mverify_infos\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 863\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mprepare_split_kwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 864\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mdownload_and_prepare_kwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 865\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 866\u001b[0m \u001b[38;5;66;03m# Sync info\u001b[39;00m\n\u001b[1;32m 867\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minfo\u001b[38;5;241m.\u001b[39mdataset_size \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msum\u001b[39m(split\u001b[38;5;241m.\u001b[39mnum_bytes \u001b[38;5;28;01mfor\u001b[39;00m split \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minfo\u001b[38;5;241m.\u001b[39msplits\u001b[38;5;241m.\u001b[39mvalues())\n",
|
116 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/builder.py:1611\u001b[0m, in \u001b[0;36mGeneratorBasedBuilder._download_and_prepare\u001b[0;34m(self, dl_manager, verify_infos, **prepare_splits_kwargs)\u001b[0m\n\u001b[1;32m 1610\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_download_and_prepare\u001b[39m(\u001b[38;5;28mself\u001b[39m, dl_manager, verify_infos, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mprepare_splits_kwargs):\n\u001b[0;32m-> 1611\u001b[0m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_download_and_prepare\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1612\u001b[0m \u001b[43m \u001b[49m\u001b[43mdl_manager\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mverify_infos\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcheck_duplicate_keys\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mverify_infos\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mprepare_splits_kwargs\u001b[49m\n\u001b[1;32m 1613\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n",
|
117 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/builder.py:953\u001b[0m, in \u001b[0;36mDatasetBuilder._download_and_prepare\u001b[0;34m(self, dl_manager, verify_infos, **prepare_split_kwargs)\u001b[0m\n\u001b[1;32m 949\u001b[0m split_dict\u001b[38;5;241m.\u001b[39madd(split_generator\u001b[38;5;241m.\u001b[39msplit_info)\n\u001b[1;32m 951\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 952\u001b[0m \u001b[38;5;66;03m# Prepare split will record examples associated to the split\u001b[39;00m\n\u001b[0;32m--> 953\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_prepare_split\u001b[49m\u001b[43m(\u001b[49m\u001b[43msplit_generator\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mprepare_split_kwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 954\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mOSError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 955\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mOSError\u001b[39;00m(\n\u001b[1;32m 956\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCannot find data file. \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 957\u001b[0m \u001b[38;5;241m+\u001b[39m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmanual_download_instructions \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 958\u001b[0m \u001b[38;5;241m+\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124mOriginal error:\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 959\u001b[0m \u001b[38;5;241m+\u001b[39m \u001b[38;5;28mstr\u001b[39m(e)\n\u001b[1;32m 960\u001b[0m ) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;28mNone\u001b[39m\n",
|
118 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/builder.py:1449\u001b[0m, in \u001b[0;36mGeneratorBasedBuilder._prepare_split\u001b[0;34m(self, split_generator, check_duplicate_keys, file_format, num_proc, max_shard_size)\u001b[0m\n\u001b[1;32m 1447\u001b[0m gen_kwargs \u001b[38;5;241m=\u001b[39m split_generator\u001b[38;5;241m.\u001b[39mgen_kwargs\n\u001b[1;32m 1448\u001b[0m job_id \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m0\u001b[39m\n\u001b[0;32m-> 1449\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m job_id, done, content \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_prepare_split_single(\n\u001b[1;32m 1450\u001b[0m gen_kwargs\u001b[38;5;241m=\u001b[39mgen_kwargs, job_id\u001b[38;5;241m=\u001b[39mjob_id, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39m_prepare_split_args\n\u001b[1;32m 1451\u001b[0m ):\n\u001b[1;32m 1452\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m done:\n\u001b[1;32m 1453\u001b[0m result \u001b[38;5;241m=\u001b[39m content\n",
|
119 |
+
"File \u001b[0;32m/opt/conda/envs/hugginface/lib/python3.8/site-packages/datasets/builder.py:1606\u001b[0m, in \u001b[0;36mGeneratorBasedBuilder._prepare_split_single\u001b[0;34m(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)\u001b[0m\n\u001b[1;32m 1604\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(e, SchemaInferenceError) \u001b[38;5;129;01mand\u001b[39;00m e\u001b[38;5;241m.\u001b[39m__context__ \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 1605\u001b[0m e \u001b[38;5;241m=\u001b[39m e\u001b[38;5;241m.\u001b[39m__context__\n\u001b[0;32m-> 1606\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m DatasetGenerationError(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mAn error occurred while generating the dataset\u001b[39m\u001b[38;5;124m\"\u001b[39m) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n\u001b[1;32m 1608\u001b[0m \u001b[38;5;28;01myield\u001b[39;00m job_id, \u001b[38;5;28;01mTrue\u001b[39;00m, (total_num_examples, total_num_bytes, writer\u001b[38;5;241m.\u001b[39m_features, num_shards, shard_lengths)\n",
|
120 |
+
"\u001b[0;31mDatasetGenerationError\u001b[0m: An error occurred while generating the dataset"
|
121 |
+
]
|
122 |
}
|
123 |
],
|
124 |
"source": [
|
|
|
129 |
{
|
130 |
"cell_type": "code",
|
131 |
"execution_count": null,
|
132 |
+
"id": "72f30241",
|
133 |
"metadata": {},
|
134 |
"outputs": [],
|
135 |
"source": []
|