Update coco.py
Browse files
coco.py
CHANGED
@@ -102,10 +102,10 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
102 |
citation=_CITATION,
|
103 |
)
|
104 |
|
105 |
-
def _split_generators(self, dl_manager
|
106 |
urls_to_download = _URLS
|
107 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
108 |
-
|
109 |
return [
|
110 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
111 |
# datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["dev"]}),
|
@@ -115,6 +115,7 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
115 |
def _generate_examples(self, filepath):
|
116 |
"""This function returns the examples in the raw (text) form."""
|
117 |
logger.info("generating examples from = %s", filepath)
|
|
|
118 |
with open(filepath, encoding="utf-8") as f:
|
119 |
data = json.loads(f)
|
120 |
for image in data["images"]:
|
|
|
102 |
citation=_CITATION,
|
103 |
)
|
104 |
|
105 |
+
def _split_generators(self, dl_manager):
|
106 |
urls_to_download = _URLS
|
107 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
108 |
+
print(download_files['train'])
|
109 |
return [
|
110 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
111 |
# datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["dev"]}),
|
|
|
115 |
def _generate_examples(self, filepath):
|
116 |
"""This function returns the examples in the raw (text) form."""
|
117 |
logger.info("generating examples from = %s", filepath)
|
118 |
+
print(download_files['train'])
|
119 |
with open(filepath, encoding="utf-8") as f:
|
120 |
data = json.loads(f)
|
121 |
for image in data["images"]:
|