Kevin Zhao commited on
Commit
98d9fe9
·
1 Parent(s): 8daa708

First working version with multiple configs

Browse files
Files changed (2) hide show
  1. dataset_infos.json +1 -0
  2. oLMpics.py +5 -5
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"Age_Comparison": {"description": "This is a set a eight datasets from the paper \"oLMpics - On what Language Model Pre-training Captures\"\nby Alon Talmor et al.\n", "citation": "@article{talmor2020olmpics,\n title={oLMpics-on what language model pre-training captures},\n author={Talmor, Alon and Elazar, Yanai and Goldberg, Yoav and Berant, Jonathan},\n journal={Transactions of the Association for Computational Linguistics},\n volume={8},\n pages={743--758},\n year={2020},\n publisher={MIT Press}\n}\n", "homepage": "https://github.com/alontalmor/oLMpics", "license": "Apache 2.0", "features": {"stem": {"dtype": "string", "id": null, "_type": "Value"}, "choices": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answerKey": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "ol_mpics_dataset", "config_name": "Age_Comparison", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 593334, "num_examples": 4032, "dataset_name": "ol_mpics_dataset"}, "test": {"name": "test", "num_bytes": 73500, "num_examples": 500, "dataset_name": "ol_mpics_dataset"}}, "download_checksums": {"https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Age_Comparison/train.jsonl": {"num_bytes": 927990, "checksum": "83a27c3d26ee13ca71109db008225d7aa05b3df63187415ed1f114e9468484a1"}, "https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Age_Comparison/test.jsonl": {"num_bytes": 115000, "checksum": "006b225ff6efd2f2fb2bba111bdf7bbae91e1a9be537074cc5f4cb49de296fb3"}}, "download_size": 1042990, "post_processing_size": null, "dataset_size": 666834, "size_in_bytes": 1709824}, "Always_Never": {"description": "This is a set a eight datasets from the paper \"oLMpics - On what Language Model Pre-training Captures\"\nby Alon Talmor et al.\n", "citation": "@article{talmor2020olmpics,\n title={oLMpics-on what language model pre-training captures},\n author={Talmor, Alon and Elazar, Yanai and Goldberg, Yoav and Berant, Jonathan},\n journal={Transactions of the Association for Computational Linguistics},\n volume={8},\n pages={743--758},\n year={2020},\n publisher={MIT Press}\n}\n", "homepage": "https://github.com/alontalmor/oLMpics", "license": "Apache 2.0", "features": {"stem": {"dtype": "string", "id": null, "_type": "Value"}, "choices": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answerKey": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "ol_mpics_dataset", "config_name": "Always_Never", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 232071, "num_examples": 1004, "dataset_name": "ol_mpics_dataset"}, "test": {"name": "test", "num_bytes": 64770, "num_examples": 280, "dataset_name": "ol_mpics_dataset"}}, "download_checksums": {"https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Always_Never/train.jsonl": {"num_bytes": 309379, "checksum": "a8a94a64c38994f2255fa8597a52b9c9c454db353878b1fd10c383a776cb49f2"}, "https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Always_Never/test.jsonl": {"num_bytes": 86330, "checksum": "189176c7b103b6ed535e1c13af95accc480456263dc3b3817711eab2839d5379"}}, "download_size": 395709, "post_processing_size": null, "dataset_size": 296841, "size_in_bytes": 692550}, "Antonym_Negation": {"description": "This is a set a eight datasets from the paper \"oLMpics - On what Language Model Pre-training Captures\"\nby Alon Talmor et al.\n", "citation": "@article{talmor2020olmpics,\n title={oLMpics-on what language model pre-training captures},\n author={Talmor, Alon and Elazar, Yanai and Goldberg, Yoav and Berant, Jonathan},\n journal={Transactions of the Association for Computational Linguistics},\n volume={8},\n pages={743--758},\n year={2020},\n publisher={MIT Press}\n}\n", "homepage": "https://github.com/alontalmor/oLMpics", "license": "Apache 2.0", "features": {"stem": {"dtype": "string", "id": null, "_type": "Value"}, "choices": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answerKey": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "ol_mpics_dataset", "config_name": "Antonym_Negation", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 639321, "num_examples": 4779, "dataset_name": "ol_mpics_dataset"}, "test": {"name": "test", "num_bytes": 66691, "num_examples": 500, "dataset_name": "ol_mpics_dataset"}}, "download_checksums": {"https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Antonym_Negation/train.jsonl": {"num_bytes": 1035978, "checksum": "ae7cda16ca9460b65e57250d837697577f41e8bf981f5f32555bcf0146f4956e"}, "https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Antonym_Negation/test.jsonl": {"num_bytes": 108191, "checksum": "9cabe691af415e6f559a7feb47806645092ee2ef4697249a516e74c49b0ec7b4"}}, "download_size": 1144169, "post_processing_size": null, "dataset_size": 706012, "size_in_bytes": 1850181}, "Encyclopedic_Composition": {"description": "This is a set a eight datasets from the paper \"oLMpics - On what Language Model Pre-training Captures\"\nby Alon Talmor et al.\n", "citation": "@article{talmor2020olmpics,\n title={oLMpics-on what language model pre-training captures},\n author={Talmor, Alon and Elazar, Yanai and Goldberg, Yoav and Berant, Jonathan},\n journal={Transactions of the Association for Computational Linguistics},\n volume={8},\n pages={743--758},\n year={2020},\n publisher={MIT Press}\n}\n", "homepage": "https://github.com/alontalmor/oLMpics", "license": "Apache 2.0", "features": {"stem": {"dtype": "string", "id": null, "_type": "Value"}, "choices": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answerKey": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "ol_mpics_dataset", "config_name": "Encyclopedic_Composition", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1044801, "num_examples": 5317, "dataset_name": "ol_mpics_dataset"}, "test": {"name": "test", "num_bytes": 95402, "num_examples": 500, "dataset_name": "ol_mpics_dataset"}}, "download_checksums": {"https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Encyclopedic_Composition/train.jsonl": {"num_bytes": 1481535, "checksum": "eee396eb2dbad2236d836f360196c341747f64f658e2507e7a5883c4afb63ee0"}, "https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Encyclopedic_Composition/test.jsonl": {"num_bytes": 136462, "checksum": "0f35311b4e023d5486db4cadf0fcdfd6ad855458bdf6afa82dc4fa2df4ad6b07"}}, "download_size": 1617997, "post_processing_size": null, "dataset_size": 1140203, "size_in_bytes": 2758200}, "Multihop_Composition": {"description": "This is a set a eight datasets from the paper \"oLMpics - On what Language Model Pre-training Captures\"\nby Alon Talmor et al.\n", "citation": "@article{talmor2020olmpics,\n title={oLMpics-on what language model pre-training captures},\n author={Talmor, Alon and Elazar, Yanai and Goldberg, Yoav and Berant, Jonathan},\n journal={Transactions of the Association for Computational Linguistics},\n volume={8},\n pages={743--758},\n year={2020},\n publisher={MIT Press}\n}\n", "homepage": "https://github.com/alontalmor/oLMpics", "license": "Apache 2.0", "features": {"stem": {"dtype": "string", "id": null, "_type": "Value"}, "choices": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answerKey": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "ol_mpics_dataset", "config_name": "Multihop_Composition", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1015532, "num_examples": 5000, "dataset_name": "ol_mpics_dataset"}, "test": {"name": "test", "num_bytes": 101500, "num_examples": 500, "dataset_name": "ol_mpics_dataset"}}, "download_checksums": {"https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Multihop_Composition/train.jsonl": {"num_bytes": 1420532, "checksum": "7516153120f23e2836a289ea571ad5ca14240fd8c67746c08c3fd411a0b8dad1"}, "https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Multihop_Composition/test.jsonl": {"num_bytes": 142000, "checksum": "0e7d785b4a6092cb2b74f88ca93c99cc6ff145b4771fce16806722ffd619c812"}}, "download_size": 1562532, "post_processing_size": null, "dataset_size": 1117032, "size_in_bytes": 2679564}, "Object_Comparison": {"description": "This is a set a eight datasets from the paper \"oLMpics - On what Language Model Pre-training Captures\"\nby Alon Talmor et al.\n", "citation": "@article{talmor2020olmpics,\n title={oLMpics-on what language model pre-training captures},\n author={Talmor, Alon and Elazar, Yanai and Goldberg, Yoav and Berant, Jonathan},\n journal={Transactions of the Association for Computational Linguistics},\n volume={8},\n pages={743--758},\n year={2020},\n publisher={MIT Press}\n}\n", "homepage": "https://github.com/alontalmor/oLMpics", "license": "Apache 2.0", "features": {"stem": {"dtype": "string", "id": null, "_type": "Value"}, "choices": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answerKey": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "ol_mpics_dataset", "config_name": "Object_Comparison", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 798275, "num_examples": 5000, "dataset_name": "ol_mpics_dataset"}, "test": {"name": "test", "num_bytes": 77873, "num_examples": 500, "dataset_name": "ol_mpics_dataset"}}, "download_checksums": {"https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Object_Comparison/train.jsonl": {"num_bytes": 1213275, "checksum": "c709fce07a0d1269c005850d29c7292ef738941d3c3d9b5b4ee0d712c3d65db7"}, "https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Object_Comparison/test.jsonl": {"num_bytes": 119373, "checksum": "8dd1797d5c7ccbb0988a3db78f4eb6c8cc48edfd775dabc79a8d52aa00b83680"}}, "download_size": 1332648, "post_processing_size": null, "dataset_size": 876148, "size_in_bytes": 2208796}, "Property_Conjunction": {"description": "This is a set a eight datasets from the paper \"oLMpics - On what Language Model Pre-training Captures\"\nby Alon Talmor et al.\n", "citation": "@article{talmor2020olmpics,\n title={oLMpics-on what language model pre-training captures},\n author={Talmor, Alon and Elazar, Yanai and Goldberg, Yoav and Berant, Jonathan},\n journal={Transactions of the Association for Computational Linguistics},\n volume={8},\n pages={743--758},\n year={2020},\n publisher={MIT Press}\n}\n", "homepage": "https://github.com/alontalmor/oLMpics", "license": "Apache 2.0", "features": {"stem": {"dtype": "string", "id": null, "_type": "Value"}, "choices": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answerKey": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "ol_mpics_dataset", "config_name": "Property_Conjunction", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 698328, "num_examples": 4000, "dataset_name": "ol_mpics_dataset"}, "test": {"name": "test", "num_bytes": 95438, "num_examples": 483, "dataset_name": "ol_mpics_dataset"}}, "download_checksums": {"https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Property_Conjunction/train.jsonl": {"num_bytes": 1022328, "checksum": "611bf0a9d9dac81df164438ecbe8aa51ace85ce88663614c56d10db0e40011ca"}, "https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Property_Conjunction/test.jsonl": {"num_bytes": 134561, "checksum": "feb0541dec0ceb57527945a7044b959405465095d2ec5a9aeda553e12207f070"}}, "download_size": 1156889, "post_processing_size": null, "dataset_size": 793766, "size_in_bytes": 1950655}, "Taxonomy_Conjunction": {"description": "This is a set a eight datasets from the paper \"oLMpics - On what Language Model Pre-training Captures\"\nby Alon Talmor et al.\n", "citation": "@article{talmor2020olmpics,\n title={oLMpics-on what language model pre-training captures},\n author={Talmor, Alon and Elazar, Yanai and Goldberg, Yoav and Berant, Jonathan},\n journal={Transactions of the Association for Computational Linguistics},\n volume={8},\n pages={743--758},\n year={2020},\n publisher={MIT Press}\n}\n", "homepage": "https://github.com/alontalmor/oLMpics", "license": "Apache 2.0", "features": {"stem": {"dtype": "string", "id": null, "_type": "Value"}, "choices": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answerKey": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "ol_mpics_dataset", "config_name": "Taxonomy_Conjunction", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 921464, "num_examples": 5310, "dataset_name": "ol_mpics_dataset"}, "test": {"name": "test", "num_bytes": 102211, "num_examples": 599, "dataset_name": "ol_mpics_dataset"}}, "download_checksums": {"https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Taxonomy_Conjunction/train.jsonl": {"num_bytes": 1351574, "checksum": "e7d591a9f433c3dc75969279667b4bdad03ea0e298df4f2f23904816044693d2"}, "https://huggingface.co/datasets/KevinZ/oLMpics/resolve/main/Taxonomy_Conjunction/test.jsonl": {"num_bytes": 150730, "checksum": "020f48b1ebd92283d2e095c969c854355e308f3d8f724c9461a685d8f7844593"}}, "download_size": 1502304, "post_processing_size": null, "dataset_size": 1023675, "size_in_bytes": 2525979}}
oLMpics.py CHANGED
@@ -76,7 +76,7 @@ class OLMpicsDataset(datasets.GeneratorBasedBuilder):
76
  features = datasets.Features(
77
  {
78
  "stem": datasets.Value("string"),
79
- "choices": datasets.Sequence("string"),
80
  "answerKey": datasets.Value("string")
81
  # These are the features of your dataset like images, labels ...
82
  }
@@ -112,7 +112,7 @@ class OLMpicsDataset(datasets.GeneratorBasedBuilder):
112
  name=datasets.Split.TRAIN,
113
  # These kwargs will be passed to _generate_examples
114
  gen_kwargs={
115
- "filepath": os.path.join(data_dir, "train.jsonl"),
116
  "split": "train",
117
  },
118
  ),
@@ -120,7 +120,7 @@ class OLMpicsDataset(datasets.GeneratorBasedBuilder):
120
  name=datasets.Split.TEST,
121
  # These kwargs will be passed to _generate_examples
122
  gen_kwargs={
123
- "filepath": os.path.join(data_dir, "test.jsonl"),
124
  "split": "test"
125
  },
126
  ),
@@ -134,7 +134,7 @@ class OLMpicsDataset(datasets.GeneratorBasedBuilder):
134
  for key, row in enumerate(f):
135
  data = json.loads(row)
136
  yield key, {
137
- "stem": data["stem"],
138
- "choices": data["choices"],
139
  "answerKey": data["answerKey"],
140
  }
 
76
  features = datasets.Features(
77
  {
78
  "stem": datasets.Value("string"),
79
+ "choices": datasets.Sequence(datasets.Value("string")),
80
  "answerKey": datasets.Value("string")
81
  # These are the features of your dataset like images, labels ...
82
  }
 
112
  name=datasets.Split.TRAIN,
113
  # These kwargs will be passed to _generate_examples
114
  gen_kwargs={
115
+ "filepath": data_dir[0],
116
  "split": "train",
117
  },
118
  ),
 
120
  name=datasets.Split.TEST,
121
  # These kwargs will be passed to _generate_examples
122
  gen_kwargs={
123
+ "filepath": data_dir[1],
124
  "split": "test"
125
  },
126
  ),
 
134
  for key, row in enumerate(f):
135
  data = json.loads(row)
136
  yield key, {
137
+ "stem": data["question"]["stem"],
138
+ "choices": data["question"]["choices"],
139
  "answerKey": data["answerKey"],
140
  }