system HF staff commited on
Commit
37d22d6
1 Parent(s): e2ab56d

Update files from the datasets library (from 1.4.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.4.0

Files changed (2) hide show
  1. README.md +21 -21
  2. cfq.py +6 -4
README.md CHANGED
@@ -27,7 +27,7 @@
27
  - [Citation Information](#citation-information)
28
  - [Contributions](#contributions)
29
 
30
- ## [Dataset Description](#dataset-description)
31
 
32
  - **Homepage:** [https://github.com/google-research/google-research/tree/master/cfq](https://github.com/google-research/google-research/tree/master/cfq)
33
  - **Repository:** [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
@@ -37,7 +37,7 @@
37
  - **Size of the generated dataset:** 345.30 MB
38
  - **Total amount of disk used:** 2386.92 MB
39
 
40
- ### [Dataset Summary](#dataset-summary)
41
 
42
  The CFQ dataset (and it's splits) for measuring compositional generalization.
43
 
@@ -46,19 +46,19 @@ See https://arxiv.org/abs/1912.09713.pdf for background.
46
  Example usage:
47
  data = datasets.load_dataset('cfq/mcd1')
48
 
49
- ### [Supported Tasks](#supported-tasks)
50
 
51
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
52
 
53
- ### [Languages](#languages)
54
 
55
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
56
 
57
- ## [Dataset Structure](#dataset-structure)
58
 
59
  We show detailed information for up to 5 configurations of the dataset.
60
 
61
- ### [Data Instances](#data-instances)
62
 
63
  #### mcd1
64
 
@@ -130,7 +130,7 @@ An example of 'train' looks as follows.
130
  }
131
  ```
132
 
133
- ### [Data Fields](#data-fields)
134
 
135
  The data fields are the same among all splits.
136
 
@@ -154,7 +154,7 @@ The data fields are the same among all splits.
154
  - `question`: a `string` feature.
155
  - `query`: a `string` feature.
156
 
157
- ### [Data Splits Sample Size](#data-splits-sample-size)
158
 
159
  | name |train |test |
160
  |----------------------|-----:|----:|
@@ -164,49 +164,49 @@ The data fields are the same among all splits.
164
  |query_complexity_split|100654| 9512|
165
  |query_pattern_split | 94600|12589|
166
 
167
- ## [Dataset Creation](#dataset-creation)
168
 
169
- ### [Curation Rationale](#curation-rationale)
170
 
171
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
172
 
173
- ### [Source Data](#source-data)
174
 
175
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
176
 
177
- ### [Annotations](#annotations)
178
 
179
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
180
 
181
- ### [Personal and Sensitive Information](#personal-and-sensitive-information)
182
 
183
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
184
 
185
- ## [Considerations for Using the Data](#considerations-for-using-the-data)
186
 
187
- ### [Social Impact of Dataset](#social-impact-of-dataset)
188
 
189
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
190
 
191
- ### [Discussion of Biases](#discussion-of-biases)
192
 
193
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
194
 
195
- ### [Other Known Limitations](#other-known-limitations)
196
 
197
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
198
 
199
- ## [Additional Information](#additional-information)
200
 
201
- ### [Dataset Curators](#dataset-curators)
202
 
203
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
204
 
205
- ### [Licensing Information](#licensing-information)
206
 
207
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
208
 
209
- ### [Citation Information](#citation-information)
210
 
211
  ```
212
 
 
27
  - [Citation Information](#citation-information)
28
  - [Contributions](#contributions)
29
 
30
+ ## Dataset Description
31
 
32
  - **Homepage:** [https://github.com/google-research/google-research/tree/master/cfq](https://github.com/google-research/google-research/tree/master/cfq)
33
  - **Repository:** [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
 
37
  - **Size of the generated dataset:** 345.30 MB
38
  - **Total amount of disk used:** 2386.92 MB
39
 
40
+ ### Dataset Summary
41
 
42
  The CFQ dataset (and it's splits) for measuring compositional generalization.
43
 
 
46
  Example usage:
47
  data = datasets.load_dataset('cfq/mcd1')
48
 
49
+ ### Supported Tasks
50
 
51
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
52
 
53
+ ### Languages
54
 
55
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
56
 
57
+ ## Dataset Structure
58
 
59
  We show detailed information for up to 5 configurations of the dataset.
60
 
61
+ ### Data Instances
62
 
63
  #### mcd1
64
 
 
130
  }
131
  ```
132
 
133
+ ### Data Fields
134
 
135
  The data fields are the same among all splits.
136
 
 
154
  - `question`: a `string` feature.
155
  - `query`: a `string` feature.
156
 
157
+ ### Data Splits Sample Size
158
 
159
  | name |train |test |
160
  |----------------------|-----:|----:|
 
164
  |query_complexity_split|100654| 9512|
165
  |query_pattern_split | 94600|12589|
166
 
167
+ ## Dataset Creation
168
 
169
+ ### Curation Rationale
170
 
171
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
172
 
173
+ ### Source Data
174
 
175
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
176
 
177
+ ### Annotations
178
 
179
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
180
 
181
+ ### Personal and Sensitive Information
182
 
183
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
184
 
185
+ ## Considerations for Using the Data
186
 
187
+ ### Social Impact of Dataset
188
 
189
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
190
 
191
+ ### Discussion of Biases
192
 
193
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
194
 
195
+ ### Other Known Limitations
196
 
197
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
198
 
199
+ ## Additional Information
200
 
201
+ ### Dataset Curators
202
 
203
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
204
 
205
+ ### Licensing Information
206
 
207
  [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
208
 
209
+ ### Citation Information
210
 
211
  ```
212
 
cfq.py CHANGED
@@ -19,13 +19,15 @@
19
  from __future__ import absolute_import, division, print_function
20
 
21
  import json
22
- import logging
23
  import os
24
  import re
25
 
26
  import datasets
27
 
28
 
 
 
 
29
  _CITATION = """
30
  @inproceedings{Keysers2020,
31
  title={Measuring Compositional Generalization: A Comprehensive Method on
@@ -141,10 +143,10 @@ class Cfq(datasets.GeneratorBasedBuilder):
141
  splits_path = os.path.join(base_directory, splits_file)
142
  with open(samples_path, encoding="utf-8") as samples_file:
143
  with open(splits_path, encoding="utf-8") as splits_file:
144
- logging.info("Reading json from %s into memory...", samples_path)
145
  samples = json.loads(self._scrub_json(samples_file.read()))
146
- logging.info("%d samples loaded", len(samples))
147
- logging.info("Loaded json data from %s.", samples_path)
148
  splits = json.load(splits_file)
149
  for idx in splits[split_id]:
150
  sample = samples[idx]
 
19
  from __future__ import absolute_import, division, print_function
20
 
21
  import json
 
22
  import os
23
  import re
24
 
25
  import datasets
26
 
27
 
28
+ logger = datasets.logging.get_logger(__name__)
29
+
30
+
31
  _CITATION = """
32
  @inproceedings{Keysers2020,
33
  title={Measuring Compositional Generalization: A Comprehensive Method on
 
143
  splits_path = os.path.join(base_directory, splits_file)
144
  with open(samples_path, encoding="utf-8") as samples_file:
145
  with open(splits_path, encoding="utf-8") as splits_file:
146
+ logger.info("Reading json from %s into memory...", samples_path)
147
  samples = json.loads(self._scrub_json(samples_file.read()))
148
+ logger.info("%d samples loaded", len(samples))
149
+ logger.info("Loaded json data from %s.", samples_path)
150
  splits = json.load(splits_file)
151
  for idx in splits[split_id]:
152
  sample = samples[idx]