SaylorTwift HF Staff commited on
Commit
803d48f
·
verified ·
1 Parent(s): 40bd5ba

Convert dataset to Parquet (#1)

Browse files

- Convert dataset to Parquet (36471f8a5a80cf860a274d22d0d6cca3ff595911)
- Add 'all' config data files (aace3a09647ce9bc4681c7d1fdfb552b4aac6791)
- Add 'black' config data files (2a8cd1f1e84550d891f930168a34d81e2a242335)
- Add 'christian' config data files (b8047d64d15f0e4d4e1dfab0beadac8bebbee5b5)
- Add 'female' config data files (0c1b4b42ffd70a7df3ea02c7971cb7e81df0c14e)
- Add 'male' config data files (d791f1268b994e96b4853b34092e4fbc60b6ef70)
- Add 'muslim' config data files (520ceb0876fe426c7537b11b8d0e948b9e7bc2c2)
- Add 'other_religions' config data files (62b16d632a2d9e4fe42cbf9e68b40994793c5a59)
- Add 'white' config data files (f332b50a48a2430faae9fac7a76c165354e88af3)
- Delete loading script (dcfbab0af6dbbdcde896b762487ca03e56b7f4ee)
- Delete data file (49869c8d76d099369a0aa7c4f923897818f31d7c)
- Delete data file (5b8bf9823914d37c121b77af0dc3df0737f036be)
- Delete data file (e508068aa94e83e3ffec8c5be937714f0bfca6ce)
- Delete data file (1ddce1cb36a3e71e31ad0f0e238c744f5084536d)
- Delete data file (b32a34489328caee461733f43b63ba334b1d4119)
- Delete data file (84f5daab9659bb848cdf93f69ce88c29aa6bbdde)
- Delete data file (9dac1e967136bb62ea19da2fe635c194c0cafb39)
- Delete data file (07c48a6aba7aa8bcf10e8c7416d7a592ec4e3f01)
- Delete data file (85bed38aff798fc360e85e804a6ce1e9558458ab)
- Delete data file (ed03904789a7136e9069be04d450e4464f2006f9)
- Delete data file (9d9dbc92ca2fa562f2c7c8e7deec9846f477ce00)
- Delete data file (a40b65dd1243a57b761eda6acb41139f37c102b0)
- Delete data file (eeb00039ba544edd868b286b41cbd3c31dfaa5cd)
- Delete data file (ff2976f59922e34a2f557526c53230e3f9eac0d2)
- Delete data file (10d409d0bdc60bd2b1bfcd47161a26e8f13eb638)
- Delete data file (7bb38c30098859aff7a3678f0c35117e2a83f16e)
- Delete data file (7ba9758c3798e17227b1656057d64ce834a27fb8)
- Delete data file (e34666d94c97548f262959632a17b8854ed91225)

LGBTQ/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3c9dfbbf8bb4cb0bebcca5d779e164920ae1ffc6af61898820dba41d4fe9402
3
+ size 1387951
LGBTQ/test.json DELETED
The diff for this file is too large to render. See raw diff
 
LGBTQ/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79dc9cd3c1b262d4c220af0d837e1fd61f5206f2fd97900f4834ca2a4422faac
3
+ size 2718125
LGBTQ/train.json DELETED
The diff for this file is too large to render. See raw diff
 
README.md ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ dataset_info:
3
+ - config_name: LGBTQ
4
+ features:
5
+ - name: text
6
+ dtype: string
7
+ - name: gold
8
+ dtype: string
9
+ - name: sub_split
10
+ dtype: string
11
+ splits:
12
+ - name: train
13
+ num_bytes: 4307730
14
+ num_examples: 8420
15
+ - name: test
16
+ num_bytes: 2200765
17
+ num_examples: 4426
18
+ download_size: 4106076
19
+ dataset_size: 6508495
20
+ - config_name: all
21
+ features:
22
+ - name: text
23
+ dtype: string
24
+ - name: gold
25
+ dtype: string
26
+ - name: sub_split
27
+ dtype: string
28
+ splits:
29
+ - name: train
30
+ num_bytes: 101801286
31
+ num_examples: 269038
32
+ - name: test
33
+ num_bytes: 50225172
34
+ num_examples: 133782
35
+ download_size: 98027803
36
+ dataset_size: 152026458
37
+ - config_name: black
38
+ features:
39
+ - name: text
40
+ dtype: string
41
+ - name: gold
42
+ dtype: string
43
+ - name: sub_split
44
+ dtype: string
45
+ splits:
46
+ - name: train
47
+ num_bytes: 5195682
48
+ num_examples: 9896
49
+ - name: test
50
+ num_bytes: 2554193
51
+ num_examples: 4872
52
+ download_size: 4932053
53
+ dataset_size: 7749875
54
+ - config_name: christian
55
+ features:
56
+ - name: text
57
+ dtype: string
58
+ - name: gold
59
+ dtype: string
60
+ - name: sub_split
61
+ dtype: string
62
+ splits:
63
+ - name: train
64
+ num_bytes: 14678468
65
+ num_examples: 26738
66
+ - name: test
67
+ num_bytes: 7218223
68
+ num_examples: 13361
69
+ download_size: 13846950
70
+ dataset_size: 21896691
71
+ - config_name: female
72
+ features:
73
+ - name: text
74
+ dtype: string
75
+ - name: gold
76
+ dtype: string
77
+ - name: sub_split
78
+ dtype: string
79
+ splits:
80
+ - name: train
81
+ num_bytes: 18002457
82
+ num_examples: 36244
83
+ - name: test
84
+ num_bytes: 8200356
85
+ num_examples: 16449
86
+ download_size: 16838750
87
+ dataset_size: 26202813
88
+ - config_name: male
89
+ features:
90
+ - name: text
91
+ dtype: string
92
+ - name: gold
93
+ dtype: string
94
+ - name: sub_split
95
+ dtype: string
96
+ splits:
97
+ - name: train
98
+ num_bytes: 14076742
99
+ num_examples: 29810
100
+ - name: test
101
+ num_bytes: 6668376
102
+ num_examples: 14295
103
+ download_size: 13358422
104
+ dataset_size: 20745118
105
+ - config_name: muslim
106
+ features:
107
+ - name: text
108
+ dtype: string
109
+ - name: gold
110
+ dtype: string
111
+ - name: sub_split
112
+ dtype: string
113
+ splits:
114
+ - name: train
115
+ num_bytes: 6789851
116
+ num_examples: 13954
117
+ - name: test
118
+ num_bytes: 3372534
119
+ num_examples: 6982
120
+ download_size: 6422814
121
+ dataset_size: 10162385
122
+ - config_name: other_religions
123
+ features:
124
+ - name: text
125
+ dtype: string
126
+ - name: gold
127
+ dtype: string
128
+ - name: sub_split
129
+ dtype: string
130
+ splits:
131
+ - name: train
132
+ num_bytes: 3533154
133
+ num_examples: 6544
134
+ - name: test
135
+ num_bytes: 1869205
136
+ num_examples: 3500
137
+ download_size: 3453436
138
+ dataset_size: 5402359
139
+ - config_name: white
140
+ features:
141
+ - name: text
142
+ dtype: string
143
+ - name: gold
144
+ dtype: string
145
+ - name: sub_split
146
+ dtype: string
147
+ splits:
148
+ - name: train
149
+ num_bytes: 8010252
150
+ num_examples: 16698
151
+ - name: test
152
+ num_bytes: 3895951
153
+ num_examples: 7969
154
+ download_size: 7557355
155
+ dataset_size: 11906203
156
+ configs:
157
+ - config_name: LGBTQ
158
+ data_files:
159
+ - split: train
160
+ path: LGBTQ/train-*
161
+ - split: test
162
+ path: LGBTQ/test-*
163
+ - config_name: all
164
+ data_files:
165
+ - split: train
166
+ path: all/train-*
167
+ - split: test
168
+ path: all/test-*
169
+ - config_name: black
170
+ data_files:
171
+ - split: train
172
+ path: black/train-*
173
+ - split: test
174
+ path: black/test-*
175
+ - config_name: christian
176
+ data_files:
177
+ - split: train
178
+ path: christian/train-*
179
+ - split: test
180
+ path: christian/test-*
181
+ - config_name: female
182
+ data_files:
183
+ - split: train
184
+ path: female/train-*
185
+ - split: test
186
+ path: female/test-*
187
+ - config_name: male
188
+ data_files:
189
+ - split: train
190
+ path: male/train-*
191
+ - split: test
192
+ path: male/test-*
193
+ - config_name: muslim
194
+ data_files:
195
+ - split: train
196
+ path: muslim/train-*
197
+ - split: test
198
+ path: muslim/test-*
199
+ - config_name: other_religions
200
+ data_files:
201
+ - split: train
202
+ path: other_religions/train-*
203
+ - split: test
204
+ path: other_religions/test-*
205
+ - config_name: white
206
+ data_files:
207
+ - split: train
208
+ path: white/train-*
209
+ - split: test
210
+ path: white/test-*
211
+ ---
all/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5eefbc18df17ab041aacee5df9f63d3cbe8234d382387c8265a0012e3dc5d86e
3
+ size 32381087
all/test.json DELETED
Binary file (54.6 MB)
 
all/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:896198962de1dc6671ff15351e2c8bc6dc59e1bf182e5d70326e8acfca9e1672
3
+ size 65646716
all/train.json DELETED
Binary file (111 MB)
 
black/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:507e9241f589d136b161c441f7ffdcf3e20f23a95ec783d556fdb9d815f38d76
3
+ size 1624232
black/test.json DELETED
The diff for this file is too large to render. See raw diff
 
black/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4120e1808e553483229a8ace7209f9f1f9b13df566e24d24d56408f3180537c5
3
+ size 3307821
black/train.json DELETED
The diff for this file is too large to render. See raw diff
 
christian/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:489f16231818a939e2259ccc1b3f92da89efec3ecaa7a7b9d06f93f73a86910e
3
+ size 4561432
christian/test.json DELETED
The diff for this file is too large to render. See raw diff
 
christian/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e1bb41926a2641a8b39cb44fb2595d3901cf4d35bcfbbc4defcda66aa8dc0fe
3
+ size 9285518
christian/train.json DELETED
The diff for this file is too large to render. See raw diff
 
civil_comments_helm.py DELETED
@@ -1,75 +0,0 @@
1
- import datasets
2
- import os
3
- import json
4
-
5
-
6
- categories = ["male", "female", "LGBTQ", "christian", "muslim", "other_religions", "black", "white", "all"]
7
-
8
- _CITATION = """
9
- @inproceedings{wilds2021,
10
- title = {{WILDS}: A Benchmark of in-the-Wild Distribution Shifts},
11
- author = {Pang Wei Koh and Shiori Sagawa and Henrik Marklund and Sang Michael Xie and Marvin Zhang and
12
- Akshay Balsubramani and Weihua Hu and Michihiro Yasunaga and Richard Lanas Phillips and Irena Gao and
13
- Tony Lee and Etienne David and Ian Stavness and Wei Guo and Berton A. Earnshaw and Imran S. Haque and
14
- Sara Beery and Jure Leskovec and Anshul Kundaje and Emma Pierson and Sergey Levine and Chelsea Finn
15
- and Percy Liang},
16
- booktitle = {International Conference on Machine Learning (ICML)},
17
- year = {2021}
18
- }
19
-
20
- @inproceedings{borkan2019nuanced,
21
- title={Nuanced metrics for measuring unintended bias with real data for text classification},
22
- author={Borkan, Daniel and Dixon, Lucas and Sorensen, Jeffrey and Thain, Nithum and Vasserman, Lucy},
23
- booktitle={Companion Proceedings of The 2019 World Wide Web Conference},
24
- pages={491--500},
25
- year={2019}
26
- }"""
27
-
28
- class CivilCommentsHELM(datasets.GeneratorBasedBuilder):
29
- VERSION = datasets.Version("1.0.0")
30
-
31
- BUILDER_CONFIGS = [
32
- datasets.BuilderConfig(name=name, version=datasets.Version("1.0.0"), description="")
33
- for name in categories
34
- ]
35
-
36
- #"references": [{"output": "The gay couple", "tags": ["negative", "ambiguous", "B", "A", "C", "B"]}, {"output": "Not enough info", "tags": ["correct", "negative", "ambiguous", "B", "A", "C", "B"]}, {"output": "The pansexual couple", "tags": ["negative", "ambiguous", "B", "A", "C", "B"]}], "choices": ["The gay couple", "Not enough info", "The pansexual couple"], "gold_index": 1}
37
-
38
- def _info(self):
39
- features = datasets.Features(
40
- {
41
- "text": datasets.Value("string"),
42
- "gold": datasets.Value("string"),
43
- "sub_split": datasets.Value("string"),
44
-
45
- }
46
- )
47
- return datasets.DatasetInfo(
48
- description=f"Civil comments, as preprocessed and shuffled in HELM",
49
- features=features,
50
- homepage="",
51
- license="",
52
- citation=_CITATION,
53
- )
54
-
55
- def _split_generators(self, dl_manager):
56
- train_json = dl_manager.download(os.path.join(self.config.name, "train.json"))
57
- test_json = dl_manager.download(os.path.join(self.config.name, "test.json"))
58
-
59
- return [
60
- datasets.SplitGenerator(
61
- name=datasets.Split.TRAIN,
62
- gen_kwargs={"path": train_json},
63
- ),
64
- datasets.SplitGenerator(
65
- name=datasets.Split.TEST,
66
- gen_kwargs={"path": test_json},
67
- )
68
- ]
69
-
70
- # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
71
- def _generate_examples(self, path):
72
- with open(path, encoding="utf-8") as f:
73
- for key, row in enumerate(f):
74
- yield key, json.loads(row)
75
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
female/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4032bd74e6ce219450c503532e1b2cbff9a9f358596e3845e2ffded3c0db91ca
3
+ size 5279991
female/test.json DELETED
The diff for this file is too large to render. See raw diff
 
female/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e3c45bafec6384299b50f518ac5db451c74026b6141ee88aaf7516456edb0aeb
3
+ size 11558759
female/train.json DELETED
The diff for this file is too large to render. See raw diff
 
male/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d46457f36ee54c1ef87ff2e32222e455b08decd88b5b9200ba4102fdd6c139c
3
+ size 4298601
male/test.json DELETED
The diff for this file is too large to render. See raw diff
 
male/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a370e421713f9891a2123f8429d6ef71ecb4a3cef353dc7e7c99e62c795d00b0
3
+ size 9059821
male/train.json DELETED
The diff for this file is too large to render. See raw diff
 
muslim/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e77e35279a8b20357ef7b618ffd8038f9c930fb010d3e9ea4d2a79636835ab34
3
+ size 2128163
muslim/test.json DELETED
The diff for this file is too large to render. See raw diff
 
muslim/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdc09ad11233e9465403a9b20e9d2b2c8b65f1882684ae1b5cad064944667574
3
+ size 4294651
muslim/train.json DELETED
The diff for this file is too large to render. See raw diff
 
other_religions/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2facdcf03520a0bcc551878812a047d4d2cf59e51ebc1acf84f2eff43de40c7
3
+ size 1191497
other_religions/test.json DELETED
The diff for this file is too large to render. See raw diff
 
other_religions/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:085f28490e5dbcd1e6b22f00ca321321040762e3ed18b56a0e72fba1c38683d4
3
+ size 2261939
other_religions/train.json DELETED
The diff for this file is too large to render. See raw diff
 
white/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:068451e56a235f235276bcb5100e06be05f45aced05e9deedb06fe3b7a8bddd1
3
+ size 2469707
white/test.json DELETED
The diff for this file is too large to render. See raw diff
 
white/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d22fa5b758e5ebf8854d30dc811004099713f9f9888f06072e990d24dfea5ee
3
+ size 5087648
white/train.json DELETED
The diff for this file is too large to render. See raw diff