tillwenke commited on
Commit
1686162
1 Parent(s): 463a104

add dataset

Browse files
Files changed (3) hide show
  1. .ipynb +0 -277
  2. data/passages.parquet/part.0.parquet +2 -2
  3. generate.py +1 -0
.ipynb DELETED
@@ -1,277 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 9,
6
- "metadata": {},
7
- "outputs": [],
8
- "source": [
9
- "import pandas as pd\n",
10
- "a = pd.read_parquet(\"data/test.parquet\")\n",
11
- "b = pd.read_parquet(\"data/passages.parquet\")"
12
- ]
13
- },
14
- {
15
- "cell_type": "code",
16
- "execution_count": 13,
17
- "metadata": {},
18
- "outputs": [
19
- {
20
- "data": {
21
- "text/html": [
22
- "<div>\n",
23
- "<style scoped>\n",
24
- " .dataframe tbody tr th:only-of-type {\n",
25
- " vertical-align: middle;\n",
26
- " }\n",
27
- "\n",
28
- " .dataframe tbody tr th {\n",
29
- " vertical-align: top;\n",
30
- " }\n",
31
- "\n",
32
- " .dataframe thead th {\n",
33
- " text-align: right;\n",
34
- " }\n",
35
- "</style>\n",
36
- "<table border=\"1\" class=\"dataframe\">\n",
37
- " <thead>\n",
38
- " <tr style=\"text-align: right;\">\n",
39
- " <th></th>\n",
40
- " <th>question</th>\n",
41
- " <th>answer</th>\n",
42
- " <th>relevant_passage_ids</th>\n",
43
- " </tr>\n",
44
- " <tr>\n",
45
- " <th>id</th>\n",
46
- " <th></th>\n",
47
- " <th></th>\n",
48
- " <th></th>\n",
49
- " </tr>\n",
50
- " </thead>\n",
51
- " <tbody>\n",
52
- " <tr>\n",
53
- " <th>0</th>\n",
54
- " <td>Is Hirschsprung disease a mendelian or a multi...</td>\n",
55
- " <td>Coding sequence mutations in RET, GDNF, EDNRB,...</td>\n",
56
- " <td>[20598273, 6650562, 15829955, 15617541, 230011...</td>\n",
57
- " </tr>\n",
58
- " <tr>\n",
59
- " <th>1</th>\n",
60
- " <td>List signaling molecules (ligands) that intera...</td>\n",
61
- " <td>The 7 known EGFR ligands are: epidermal growt...</td>\n",
62
- " <td>[23821377, 24323361, 23382875, 22247333, 23787...</td>\n",
63
- " </tr>\n",
64
- " <tr>\n",
65
- " <th>2</th>\n",
66
- " <td>Is the protein Papilin secreted?</td>\n",
67
- " <td>Yes, papilin is a secreted protein</td>\n",
68
- " <td>[21784067, 19297413, 15094122, 7515725, 332004...</td>\n",
69
- " </tr>\n",
70
- " <tr>\n",
71
- " <th>3</th>\n",
72
- " <td>Are long non coding RNAs spliced?</td>\n",
73
- " <td>Long non coding RNAs appear to be spliced thro...</td>\n",
74
- " <td>[22955974, 21622663, 22707570, 22955988, 24285...</td>\n",
75
- " </tr>\n",
76
- " <tr>\n",
77
- " <th>4</th>\n",
78
- " <td>Is RANKL secreted from the cells?</td>\n",
79
- " <td>Receptor activator of nuclear factor κB ligand...</td>\n",
80
- " <td>[22867712, 23827649, 21618594, 23835909, 24265...</td>\n",
81
- " </tr>\n",
82
- " <tr>\n",
83
- " <th>...</th>\n",
84
- " <td>...</td>\n",
85
- " <td>...</td>\n",
86
- " <td>...</td>\n",
87
- " </tr>\n",
88
- " <tr>\n",
89
- " <th>4714</th>\n",
90
- " <td>Is PPROM a condition that occurs in males or f...</td>\n",
91
- " <td>Preterm premature rupture of fetal membranes (...</td>\n",
92
- " <td>[23599878, 23573382, 24304137, 18301713, 23179...</td>\n",
93
- " </tr>\n",
94
- " <tr>\n",
95
- " <th>4715</th>\n",
96
- " <td>What is EpiMethylTag?</td>\n",
97
- " <td>EpiMethylTag is a fast, low-input, low sequenc...</td>\n",
98
- " <td>[31752933]</td>\n",
99
- " </tr>\n",
100
- " <tr>\n",
101
- " <th>4716</th>\n",
102
- " <td>What is the target of Sutimlimab?</td>\n",
103
- " <td>Sutimlimab is a novel humanized monoclonal ant...</td>\n",
104
- " <td>[30635392, 31229501, 33826820, 32176765, 31114...</td>\n",
105
- " </tr>\n",
106
- " <tr>\n",
107
- " <th>4717</th>\n",
108
- " <td>Can parasite infections by Schistosoma japonic...</td>\n",
109
- " <td>A peptide named as SJMHE1 from Schistosoma jap...</td>\n",
110
- " <td>[26840774, 34703270, 28614408, 31496071, 18654...</td>\n",
111
- " </tr>\n",
112
- " <tr>\n",
113
- " <th>4718</th>\n",
114
- " <td>Describe Multilocus Inherited Neoplasia Allele...</td>\n",
115
- " <td>Genetic testing of hereditary cancer using com...</td>\n",
116
- " <td>[30580288]</td>\n",
117
- " </tr>\n",
118
- " </tbody>\n",
119
- "</table>\n",
120
- "<p>4719 rows × 3 columns</p>\n",
121
- "</div>"
122
- ],
123
- "text/plain": [
124
- " question \\\n",
125
- "id \n",
126
- "0 Is Hirschsprung disease a mendelian or a multi... \n",
127
- "1 List signaling molecules (ligands) that intera... \n",
128
- "2 Is the protein Papilin secreted? \n",
129
- "3 Are long non coding RNAs spliced? \n",
130
- "4 Is RANKL secreted from the cells? \n",
131
- "... ... \n",
132
- "4714 Is PPROM a condition that occurs in males or f... \n",
133
- "4715 What is EpiMethylTag? \n",
134
- "4716 What is the target of Sutimlimab? \n",
135
- "4717 Can parasite infections by Schistosoma japonic... \n",
136
- "4718 Describe Multilocus Inherited Neoplasia Allele... \n",
137
- "\n",
138
- " answer \\\n",
139
- "id \n",
140
- "0 Coding sequence mutations in RET, GDNF, EDNRB,... \n",
141
- "1 The 7 known EGFR ligands are: epidermal growt... \n",
142
- "2 Yes, papilin is a secreted protein \n",
143
- "3 Long non coding RNAs appear to be spliced thro... \n",
144
- "4 Receptor activator of nuclear factor κB ligand... \n",
145
- "... ... \n",
146
- "4714 Preterm premature rupture of fetal membranes (... \n",
147
- "4715 EpiMethylTag is a fast, low-input, low sequenc... \n",
148
- "4716 Sutimlimab is a novel humanized monoclonal ant... \n",
149
- "4717 A peptide named as SJMHE1 from Schistosoma jap... \n",
150
- "4718 Genetic testing of hereditary cancer using com... \n",
151
- "\n",
152
- " relevant_passage_ids \n",
153
- "id \n",
154
- "0 [20598273, 6650562, 15829955, 15617541, 230011... \n",
155
- "1 [23821377, 24323361, 23382875, 22247333, 23787... \n",
156
- "2 [21784067, 19297413, 15094122, 7515725, 332004... \n",
157
- "3 [22955974, 21622663, 22707570, 22955988, 24285... \n",
158
- "4 [22867712, 23827649, 21618594, 23835909, 24265... \n",
159
- "... ... \n",
160
- "4714 [23599878, 23573382, 24304137, 18301713, 23179... \n",
161
- "4715 [31752933] \n",
162
- "4716 [30635392, 31229501, 33826820, 32176765, 31114... \n",
163
- "4717 [26840774, 34703270, 28614408, 31496071, 18654... \n",
164
- "4718 [30580288] \n",
165
- "\n",
166
- "[4719 rows x 3 columns]"
167
- ]
168
- },
169
- "execution_count": 13,
170
- "metadata": {},
171
- "output_type": "execute_result"
172
- }
173
- ],
174
- "source": [
175
- "a"
176
- ]
177
- },
178
- {
179
- "cell_type": "code",
180
- "execution_count": 11,
181
- "metadata": {},
182
- "outputs": [
183
- {
184
- "data": {
185
- "text/html": [
186
- "<div>\n",
187
- "<style scoped>\n",
188
- " .dataframe tbody tr th:only-of-type {\n",
189
- " vertical-align: middle;\n",
190
- " }\n",
191
- "\n",
192
- " .dataframe tbody tr th {\n",
193
- " vertical-align: top;\n",
194
- " }\n",
195
- "\n",
196
- " .dataframe thead th {\n",
197
- " text-align: right;\n",
198
- " }\n",
199
- "</style>\n",
200
- "<table border=\"1\" class=\"dataframe\">\n",
201
- " <thead>\n",
202
- " <tr style=\"text-align: right;\">\n",
203
- " <th></th>\n",
204
- " <th>passage</th>\n",
205
- " </tr>\n",
206
- " <tr>\n",
207
- " <th>id</th>\n",
208
- " <th></th>\n",
209
- " </tr>\n",
210
- " </thead>\n",
211
- " <tbody>\n",
212
- " <tr>\n",
213
- " <th>21495810</th>\n",
214
- " <td>OBJECT: Factors determining choice of an acade...</td>\n",
215
- " </tr>\n",
216
- " <tr>\n",
217
- " <th>26869762</th>\n",
218
- " <td>Castleman disease (CD) is a rare, heterogeneou...</td>\n",
219
- " </tr>\n",
220
- " <tr>\n",
221
- " <th>28049410</th>\n",
222
- " <td>BACKGROUND: Data extraction and integration me...</td>\n",
223
- " </tr>\n",
224
- " <tr>\n",
225
- " <th>24510469</th>\n",
226
- " <td>Flecainide is recommended as a first-line anti...</td>\n",
227
- " </tr>\n",
228
- " <tr>\n",
229
- " <th>8650761</th>\n",
230
- " <td>Primary intestinal lymphangiectasia (PIL), fir...</td>\n",
231
- " </tr>\n",
232
- " </tbody>\n",
233
- "</table>\n",
234
- "</div>"
235
- ],
236
- "text/plain": [
237
- " passage\n",
238
- "id \n",
239
- "21495810 OBJECT: Factors determining choice of an acade...\n",
240
- "26869762 Castleman disease (CD) is a rare, heterogeneou...\n",
241
- "28049410 BACKGROUND: Data extraction and integration me...\n",
242
- "24510469 Flecainide is recommended as a first-line anti...\n",
243
- "8650761 Primary intestinal lymphangiectasia (PIL), fir..."
244
- ]
245
- },
246
- "execution_count": 11,
247
- "metadata": {},
248
- "output_type": "execute_result"
249
- }
250
- ],
251
- "source": [
252
- "b"
253
- ]
254
- }
255
- ],
256
- "metadata": {
257
- "kernelspec": {
258
- "display_name": "env",
259
- "language": "python",
260
- "name": "python3"
261
- },
262
- "language_info": {
263
- "codemirror_mode": {
264
- "name": "ipython",
265
- "version": 3
266
- },
267
- "file_extension": ".py",
268
- "mimetype": "text/x-python",
269
- "name": "python",
270
- "nbconvert_exporter": "python",
271
- "pygments_lexer": "ipython3",
272
- "version": "3.10.12"
273
- }
274
- },
275
- "nbformat": 4,
276
- "nbformat_minor": 2
277
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/passages.parquet/part.0.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c288905f142dde9c3c21207333380a81d3f34603584851be02ccf7e543041934
3
- size 12581
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93afd23506e6ab65451a43a411fd6481b6378a00fef7983b44cc8c3ddbb37c84
3
+ size 24470604
generate.py CHANGED
@@ -73,6 +73,7 @@ if __name__ == "__main__":
73
 
74
  # intermediate save
75
  if i % 1000 == 0:
 
76
  dd.from_pandas(passages, npartitions=1).to_parquet(PATH_TO_PASSAGE_DATASET)
77
 
78
 
 
73
 
74
  # intermediate save
75
  if i % 1000 == 0:
76
+ passages.index.name = "id"
77
  dd.from_pandas(passages, npartitions=1).to_parquet(PATH_TO_PASSAGE_DATASET)
78
 
79