How do I get the MSCOCO captions dataset?
How do I get the MSCOCO captions dataset?
It seems to be commented out in the mscoco config, is there an alternative way to do it?
I have loaded the complete dataset, but currently have found no way to filter just the captions dataset.
As described in the Dataset Card, you can download the captioning dataset as follows:
import datasets as ds
dataset = ds.load_dataset(
"shunk031/MSCOCO",
year=2014,
coco_task="captions",
)
It seems to be commented out in the mscoco config, is there an alternative way to do it?
I don't know what the commented out MSCOCO config refers to. Please explain more specifically.
If you can provide me with a code snippet of what you are running, I may be able to assist you in some way.
I get a valuerror when I do this. Please refer below. I would appreciate some help on this.
####################################
description=None, batch_size=None, columns=None, features=None) doesn't have a 'year' key.
File "/UsersDesktop/Contrastive_loss/src/datasets/inspect_dataset.py", line 9, in
main()
File "/Users/Desktop/Contrastive_loss/src/datasets/inspect_dataset.py", line 5, in main
dataset.load_dataset()
File "/Users/Desktop/Contrastive_loss/src/datasets/mscoco_dataset.py", line 61, in load_dataset
self.dataset = load_dataset(
File "/Users/.pyenv/versions/3.9.16/lib/python3.9/site-packages/datasets/load.py", line 2587, in load_dataset
builder_instance = load_dataset_builder(
File "/Users/.pyenv/versions/3.9.16/lib/python3.9/site-packages/datasets/load.py", line 2296, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/Users/.pyenv/versions/3.9.16/lib/python3.9/site-packages/datasets/builder.py", line 374, in init
self.config, self.config_id = self._create_builder_config(
File "/Users/.pyenv/versions/3.9.16/lib/python3.9/site-packages/datasets/builder.py", line 620, in _create_builder_config
raise ValueError(f"BuilderConfig {builder_config} doesn't have a '{key}' key.")
ValueError: BuilderConfig ParquetConfig(name='default', version=0.0.0, data_dir=None, data_files={NamedSplit('train'): ['hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00000-of-00028-46418562c678d918.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00001-of-00028-4cf550a308444a40.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00002-of-00028-d07d687e9f9d351d.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00003-of-00028-8221c953584d9a17.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00004-of-00028-861ed95ce8e501a5.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00005-of-00028-9c2f76e472fd83a5.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00006-of-00028-2ef867f3435442db.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00007-of-00028-776534772839346b.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00008-of-00028-be6815774d42eaf8.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00009-of-00028-61cd0ae444f8d714.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00010-of-00028-9f6fdc4e0fff33a0.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00011-of-00028-18cf8f25663605cc.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00012-of-00028-cdcd84907b2a3405.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00013-of-00028-e2d5b1645894bac4.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00014-of-00028-921a0d651eb97257.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00015-of-00028-482c444d20261328.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00016-of-00028-b895ee24fda5f827.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00017-of-00028-b812bc52d16646a9.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00018-of-00028-8af87e3bef530de3.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00019-of-00028-ab04fb77a47703da.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00020-of-00028-3200f73ee8eee6ad.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00021-of-00028-c9b5365838e2dca1.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00022-of-00028-6f6d8b88cd2d48c5.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00023-of-00028-981cbc94cb5873d0.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00024-of-00028-cba7ace8990f74cb.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00025-of-00028-3c4fc618d973528e.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00026-of-00028-af011d8a50442eac.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/train-00027-of-00028-e65617b1b499ac11.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00000-of-00029-43f664c7085974d2.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00000-of-00031-58fd6e9498426a3c.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00001-of-00029-12c3ac1bfb7905eb.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00001-of-00031-31fdd9d94aa6140d.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00002-of-00029-71ccd83d210a4742.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00002-of-00031-986b55c326d108e1.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00003-of-00029-99da0a72cdc2016d.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00003-of-00031-a25dce205b6fb798.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00004-of-00029-ebb9b44b7a4b8f07.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00004-of-00031-e0666c3348dfe8ac.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00005-of-00029-5ef38ce0deb4ed91.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00006-of-00029-6e3703360997e41a.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00007-of-00029-399af2f3c67d84b2.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00008-of-00029-0e9f9a5808125401.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00009-of-00029-888294067c6ca164.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00010-of-00029-29f5baa5393cb6ae.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00011-of-00029-f5a4dd8cde042c48.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00012-of-00029-fef6c7d5a6da213c.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00013-of-00029-ee76afcddd380d06.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00014-of-00029-7f605186d16ec215.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00015-of-00029-d423611192e481e3.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00016-of-00029-263bdba94947abb5.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00017-of-00029-e998a5c410ef5add.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00018-of-00029-3867765d794cc7fd.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00019-of-00029-9ac2cb9ebd991fd1.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00020-of-00029-b90d240673df4de7.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00021-of-00029-9cbd561c963f77f9.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00022-of-00029-8cdf8d06653fdce1.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00023-of-00029-e9f693231121619e.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00024-of-00029-9c9342d39781f302.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00025-of-00029-4bd1cdeff7626d51.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00026-of-00029-7b734a9486c17a30.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-instances/train-00027-of-00029-39f26e2e399695c1.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-person_keypoints/train-00000-of-00015-205dadb159dd7fda.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-person_keypoints/train-00000-of-00016-6969dc0beb239082.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-person_keypoints/train-00001-of-00015-d15db78ea5ce7c8c.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-person_keypoints/train-00002-of-00015-354d656dadae49c1.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00000-of-00040-52e1b9319204ed58.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00000-of-00040-b3d4db8cbc77bf7b.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00001-of-00040-454ba984610515d9.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00001-of-00040-f0e3dfb2be209931.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00002-of-00040-235da6b666057644.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00002-of-00040-c15a23abd21dfca3.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00003-of-00040-33380323003aab1a.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00003-of-00040-eeb87122ebe549a2.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00004-of-00040-55d69d0bde297c4e.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00004-of-00040-7f909ef5074a2122.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00005-of-00040-00353ff73819d6ed.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00005-of-00040-d0e633912d972cfe.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00006-of-00040-a45331081f0d72b8.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00006-of-00040-eca768e38696609d.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00007-of-00040-d65fd2f81174d2cb.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00007-of-00040-fa0de0303f909e9d.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00008-of-00040-6dd3e44b4ba53caa.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00008-of-00040-81678a4cc352b52c.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00009-of-00040-07257766f69e6c8c.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00009-of-00040-b899a5f8b651988d.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00010-of-00040-76b3da4cb06c47d7.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00010-of-00040-a742607fae1a3b3c.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00011-of-00040-95ac1d3fdfcd17d7.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00011-of-00040-eef843067d5127a2.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00012-of-00040-d5d95a535a66ec06.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00012-of-00040-f91cd410915efd45.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00013-of-00040-45ebab5c69e4c9d7.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00013-of-00040-5a2bf2576cca497c.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00014-of-00040-1debf525e32c74ae.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00014-of-00040-610721b0c6435712.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00015-of-00040-9e22c8b135dc5316.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00016-of-00040-68cb15ea22e18a7e.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00017-of-00040-8f2feacc66b33d69.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00018-of-00040-0f4f4502dec814b2.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00019-of-00040-89cc2ec77bbc4ae1.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00020-of-00040-fdc9527084ea06b1.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00021-of-00040-bec09fb21e1094c9.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00022-of-00040-8f40e83040714a28.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00023-of-00040-bce5691377533bbc.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-captions/train-00024-of-00040-b024612e05c1445a.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00000-of-00041-beca40a60d09d58d.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00000-of-00044-ef4ac0b36b09de84.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00001-of-00041-30ce420aecc5c1ea.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00001-of-00044-00fc5d60278acbe9.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00002-of-00041-1b0b11e1e980f500.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00003-of-00041-9bf025970b01e556.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00004-of-00041-2da8bc1db4bbdf42.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00005-of-00041-2b626d4217b0ac5f.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00006-of-00041-17f94a6e1e7cfa41.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00007-of-00041-6acd8939f54aac6b.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00008-of-00041-c3617d6870535847.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00009-of-00041-b222f058e225ed54.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00010-of-00041-52bb58c13a8dc137.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00011-of-00041-594641f4b53c44a9.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00012-of-00041-d5627448dd9359f5.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-instances/train-00013-of-00041-bfb411083a49bd56.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-person_keypoints/train-00000-of-00023-110d0be5549fd396.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-person_keypoints/train-00000-of-00024-72f3bc2d5299d1b3.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-person_keypoints/train-00001-of-00023-21f1c0752efc77ee.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-person_keypoints/train-00001-of-00024-9f29fd7481752d43.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-person_keypoints/train-00002-of-00023-7acf1553bcf05a20.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-person_keypoints/train-00003-of-00023-e9a2f271fb54ced9.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-person_keypoints/train-00004-of-00023-73f412ce0c54fdcb.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-person_keypoints/train-00005-of-00023-85a6495d9ebb1195.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2017-person_keypoints/train-00006-of-00023-a7ef63aa6d509724.parquet'], NamedSplit('validation'): ['hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00000-of-00014-63a5480a7abea7a4.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00000-of-00014-6dcd4dd55a47a1ad.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00001-of-00014-5ea2ec8f2e0a4df3.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00001-of-00014-69a4a69906d81414.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00002-of-00014-5b23d2e8deb6d699.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00002-of-00014-8217ee609cace71a.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00003-of-00014-1e72fb6b1181841d.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00003-of-00014-577aace139dfa221.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00004-of-00014-6fcffff0258c31e4.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00004-of-00014-ca054d4574724f6e.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00005-of-00014-019159f14cf9895c.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00005-of-00014-25f2db7ff727a5f5.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00006-of-00014-620d05372f6ff042.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00006-of-00014-e42bcf563f66adc0.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00007-of-00014-319e8c0271d951d0.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00007-of-00014-4147174990f42e9e.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00008-of-00014-5bb5529569f67d57.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00008-of-00014-860e1b3bd1d07d16.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00009-of-00014-0a05f30d7e5031d0.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00009-of-00014-4d87f3812f964f38.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00010-of-00014-81ce8b7dae323699.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00010-of-00014-f296c85ba96c2c30.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00011-of-00014-158fd2519330fd26.parquet', 'hf://datasets/shunk031/MSCOCO@fbe444226daf89738fc1838e8b27f44a2557b18f/2014-captions/validation-00012-of-00014-479dcb7ed9febf3b.parquet']}, description=None, batch_size=None, columns=None, features=None) doesn't have a 'year' key.
###################################################
Here is my very straightforward code
from datasets import Features, Value, Array2D, Sequence, load_dataset, get_dataset_config_names
from base_dataset import BaseDataset
import pyarrow.parquet as pq
class MSCOCODataset(BaseDataset):
def init(self, year=2017, coco_task='instances', decode_rle=True):
super().init(coco_task)
self.year = year
self.decode_rle = decode_rle
self.dataset = None
self.coco_task = coco_task
def load_dataset(self):
self.dataset = load_dataset(
"shunk031/MSCOCO",
year=2014,
coco_task="captions",
)
def process_dataset(self):
pass
def __getitem__(self, index):
return self.dataset[index]
def __len__(self):
return len(self.dataset)
def inspect_dataset(self):
print(self.dataset['train'][0])
Seeing the same crash (... doesn't have a 'year' key) for the snippet
import datasets as ds
dataset = ds.load_dataset(
"shunk031/MSCOCO",
year=2017,
coco_task="captions",
)
Try the following:
dataset = ds.load_dataset("shunk031/MSCOCO", "2014-captions") # or 2017-captions
dataset = load_dataset("shunk031/MSCOCO", "2014-captions")
->
Resolving data files: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 130/130 [00:00<00:00, 195.52it/s]
Resolving data files: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 24/24 [00:00<00:00, 43.80it/s]
...
ValueError: BuilderConfig '2014-captions' not found. Available: ['default']
dataset = load_dataset("shunk031/MSCOCO", task="2014-captions")
->
Resolving data files: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 130/130 [00:00<00:00, 186.01it/s]
Resolving data files: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 24/24 [00:00<00:00, 48.57it/s]
Downloading data: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 130/130 [00:00<00:00, 1296.21files/s]
Downloading data: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 24/24 [00:00<00:00, 1536.66files/s]
Generating train split: 82783 examples [00:31, 2629.02 examples/s]
...
TypeError: Couldn't cast array of type
struct<annotation_id: list<element: int64>, image_id: list<element: int64>, segmentation: list<element: struct<bytes: binary, path: string>>, area: list<element: float>, iscrowd: list<element: bool>, bbox: list<element: fixed_size_list<element: float>[4]>, category_id: list<element: int32>, category: list<element: struct<category_id: int32, name: int64, supercategory: int64>>>
to
{'annotation_id': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'image_id': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'caption': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)}
I have confirmed that there are bugs in my environment as well. I am currently attempting to fix them. Thank you very much for letting me know.
I'm currently working on fixing the bug with the following PR: https://github.com/shunk031/huggingface-datasets_MSCOCO/pull/8
Hi, @nikhilhulle @rdondera-microsoft
I have decided to revert the recent update. I think you can download the data now. Please try downloading again according to the README.
Confirming that the current code works when called with both
dataset = load_dataset("shunk031/MSCOCO", name="2017-captions", split="validation")
dataset = load_dataset("shunk031/MSCOCO", year=2017, coco_task="captions", split="validation")
.