soerenray commited on
Commit
3460779
1 Parent(s): f81ca84

Upload exploration.ipynb with huggingface_hub

Browse files
Files changed (1) hide show
  1. exploration.ipynb +26 -179
exploration.ipynb CHANGED
@@ -12,7 +12,7 @@
12
  },
13
  {
14
  "cell_type": "code",
15
- "execution_count": 1,
16
  "id": "a32c61a3-b0f8-430b-9c4d-ff27a1a7942e",
17
  "metadata": {},
18
  "outputs": [],
@@ -23,137 +23,10 @@
23
  },
24
  {
25
  "cell_type": "code",
26
- "execution_count": 2,
27
  "id": "fada8bfa-c2ea-441a-9d07-f67fa8047138",
28
  "metadata": {},
29
- "outputs": [
30
- {
31
- "data": {
32
- "application/vnd.jupyter.widget-view+json": {
33
- "model_id": "793bc6d31f7c430f99c5a535c9f810e2",
34
- "version_major": 2,
35
- "version_minor": 0
36
- },
37
- "text/plain": [
38
- "Downloading readme: 0%| | 0.00/782 [00:00<?, ?B/s]"
39
- ]
40
- },
41
- "metadata": {},
42
- "output_type": "display_data"
43
- },
44
- {
45
- "data": {
46
- "application/vnd.jupyter.widget-view+json": {
47
- "model_id": "d5a8278532bf48669b3c6322184f4a08",
48
- "version_major": 2,
49
- "version_minor": 0
50
- },
51
- "text/plain": [
52
- "Downloading data files: 0%| | 0/3 [00:00<?, ?it/s]"
53
- ]
54
- },
55
- "metadata": {},
56
- "output_type": "display_data"
57
- },
58
- {
59
- "data": {
60
- "application/vnd.jupyter.widget-view+json": {
61
- "model_id": "fc555fe7338e4e2283195c5fcd197383",
62
- "version_major": 2,
63
- "version_minor": 0
64
- },
65
- "text/plain": [
66
- "Downloading data: 0%| | 0.00/10.6M [00:00<?, ?B/s]"
67
- ]
68
- },
69
- "metadata": {},
70
- "output_type": "display_data"
71
- },
72
- {
73
- "data": {
74
- "application/vnd.jupyter.widget-view+json": {
75
- "model_id": "f562fcb145974bacb44deb1601095a22",
76
- "version_major": 2,
77
- "version_minor": 0
78
- },
79
- "text/plain": [
80
- "Downloading data: 0%| | 0.00/1.41M [00:00<?, ?B/s]"
81
- ]
82
- },
83
- "metadata": {},
84
- "output_type": "display_data"
85
- },
86
- {
87
- "data": {
88
- "application/vnd.jupyter.widget-view+json": {
89
- "model_id": "4574322be3824d749649a01ddc28ca82",
90
- "version_major": 2,
91
- "version_minor": 0
92
- },
93
- "text/plain": [
94
- "Downloading data: 0%| | 0.00/638k [00:00<?, ?B/s]"
95
- ]
96
- },
97
- "metadata": {},
98
- "output_type": "display_data"
99
- },
100
- {
101
- "data": {
102
- "application/vnd.jupyter.widget-view+json": {
103
- "model_id": "ef4f9b9247e545759e5c2d5b40315de7",
104
- "version_major": 2,
105
- "version_minor": 0
106
- },
107
- "text/plain": [
108
- "Extracting data files: 0%| | 0/3 [00:00<?, ?it/s]"
109
- ]
110
- },
111
- "metadata": {},
112
- "output_type": "display_data"
113
- },
114
- {
115
- "data": {
116
- "application/vnd.jupyter.widget-view+json": {
117
- "model_id": "fdc18a8dc915447486fb922ba67d7299",
118
- "version_major": 2,
119
- "version_minor": 0
120
- },
121
- "text/plain": [
122
- "Generating train split: 0%| | 0/51093 [00:00<?, ? examples/s]"
123
- ]
124
- },
125
- "metadata": {},
126
- "output_type": "display_data"
127
- },
128
- {
129
- "data": {
130
- "application/vnd.jupyter.widget-view+json": {
131
- "model_id": "844dede7e86d48449b913bbf105aa355",
132
- "version_major": 2,
133
- "version_minor": 0
134
- },
135
- "text/plain": [
136
- "Generating validation split: 0%| | 0/6799 [00:00<?, ? examples/s]"
137
- ]
138
- },
139
- "metadata": {},
140
- "output_type": "display_data"
141
- },
142
- {
143
- "data": {
144
- "application/vnd.jupyter.widget-view+json": {
145
- "model_id": "6e988cd434ea4f10bfc5709b100a1a06",
146
- "version_major": 2,
147
- "version_minor": 0
148
- },
149
- "text/plain": [
150
- "Generating test split: 0%| | 0/3081 [00:00<?, ? examples/s]"
151
- ]
152
- },
153
- "metadata": {},
154
- "output_type": "display_data"
155
- }
156
- ],
157
  "source": [
158
  "dataset = datasets.load_dataset(\"renumics/speech_commands_enrichment_only\")\n",
159
  "raw_dataset = datasets.load_dataset(\"speech_commands\", 'v0.01')"
@@ -161,7 +34,7 @@
161
  },
162
  {
163
  "cell_type": "code",
164
- "execution_count": 3,
165
  "id": "7e486382-31cd-4b69-8a9e-fe3d7ac94b41",
166
  "metadata": {},
167
  "outputs": [
@@ -184,7 +57,7 @@
184
  "})"
185
  ]
186
  },
187
- "execution_count": 3,
188
  "metadata": {},
189
  "output_type": "execute_result"
190
  }
@@ -195,7 +68,7 @@
195
  },
196
  {
197
  "cell_type": "code",
198
- "execution_count": 4,
199
  "id": "9594c54a-c024-4492-af7b-f1c25bb4de6b",
200
  "metadata": {},
201
  "outputs": [
@@ -218,7 +91,7 @@
218
  "})"
219
  ]
220
  },
221
- "execution_count": 4,
222
  "metadata": {},
223
  "output_type": "execute_result"
224
  }
@@ -229,7 +102,7 @@
229
  },
230
  {
231
  "cell_type": "code",
232
- "execution_count": 5,
233
  "id": "ddda31eb-fdab-4ed3-81cc-88506ae0d7d5",
234
  "metadata": {},
235
  "outputs": [],
@@ -241,7 +114,7 @@
241
  },
242
  {
243
  "cell_type": "code",
244
- "execution_count": 6,
245
  "id": "2b8918a3-5037-4062-b9cd-40b4a8a4d6c0",
246
  "metadata": {},
247
  "outputs": [
@@ -254,7 +127,7 @@
254
  "})"
255
  ]
256
  },
257
- "execution_count": 6,
258
  "metadata": {},
259
  "output_type": "execute_result"
260
  }
@@ -265,7 +138,7 @@
265
  },
266
  {
267
  "cell_type": "code",
268
- "execution_count": 7,
269
  "id": "fa6ca118-3df0-4b6b-a036-4c70544500e3",
270
  "metadata": {},
271
  "outputs": [
@@ -278,7 +151,7 @@
278
  "})"
279
  ]
280
  },
281
- "execution_count": 7,
282
  "metadata": {},
283
  "output_type": "execute_result"
284
  }
@@ -290,46 +163,17 @@
290
  },
291
  {
292
  "cell_type": "code",
293
- "execution_count": 8,
294
  "id": "0a56d781-5b5c-4deb-aa4f-c9a1a96ac650",
295
  "metadata": {},
296
- "outputs": [
297
- {
298
- "data": {
299
- "application/vnd.jupyter.widget-view+json": {
300
- "model_id": "4daa94720e334ecd9c1d3cc679bc1ee5",
301
- "version_major": 2,
302
- "version_minor": 0
303
- },
304
- "text/plain": [
305
- "Flattening the indices: 0%| | 0/60973 [00:00<?, ? examples/s]"
306
- ]
307
- },
308
- "metadata": {},
309
- "output_type": "display_data"
310
- },
311
- {
312
- "data": {
313
- "application/vnd.jupyter.widget-view+json": {
314
- "model_id": "5a7effce6372433b814701d1a0a51e05",
315
- "version_major": 2,
316
- "version_minor": 0
317
- },
318
- "text/plain": [
319
- "Flattening the indices: 0%| | 0/60973 [00:00<?, ? examples/s]"
320
- ]
321
- },
322
- "metadata": {},
323
- "output_type": "display_data"
324
- }
325
- ],
326
  "source": [
327
  "complete_dataset = datasets.concatenate_datasets([raw_dataset_joined, joined_dataset_enrichment], axis=1)"
328
  ]
329
  },
330
  {
331
  "cell_type": "code",
332
- "execution_count": 9,
333
  "id": "cb487431-8bc6-483a-bf25-a917278b6781",
334
  "metadata": {},
335
  "outputs": [
@@ -342,7 +186,7 @@
342
  "})"
343
  ]
344
  },
345
- "execution_count": 9,
346
  "metadata": {},
347
  "output_type": "execute_result"
348
  }
@@ -353,17 +197,19 @@
353
  },
354
  {
355
  "cell_type": "code",
356
- "execution_count": 11,
357
  "id": "a11fefeb-9fd1-4500-9b9f-3275207b1cde",
358
  "metadata": {},
359
  "outputs": [
360
  {
361
- "name": "stderr",
362
- "output_type": "stream",
363
- "text": [
364
- "\n",
365
- "KeyboardInterrupt\n",
366
- "\n"
 
 
367
  ]
368
  }
369
  ],
@@ -371,6 +217,7 @@
371
  "spotlight.show(\n",
372
  " complete_dataset,\n",
373
  " #layout= layout.parse(\"spotlight-layout.json\"),\n",
 
374
  " port=7860, \n",
375
  " host=\"0.0.0.0\",\n",
376
  " allow_filebrowsing=False \n",
 
12
  },
13
  {
14
  "cell_type": "code",
15
+ "execution_count": 2,
16
  "id": "a32c61a3-b0f8-430b-9c4d-ff27a1a7942e",
17
  "metadata": {},
18
  "outputs": [],
 
23
  },
24
  {
25
  "cell_type": "code",
26
+ "execution_count": 3,
27
  "id": "fada8bfa-c2ea-441a-9d07-f67fa8047138",
28
  "metadata": {},
29
+ "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  "source": [
31
  "dataset = datasets.load_dataset(\"renumics/speech_commands_enrichment_only\")\n",
32
  "raw_dataset = datasets.load_dataset(\"speech_commands\", 'v0.01')"
 
34
  },
35
  {
36
  "cell_type": "code",
37
+ "execution_count": 4,
38
  "id": "7e486382-31cd-4b69-8a9e-fe3d7ac94b41",
39
  "metadata": {},
40
  "outputs": [
 
57
  "})"
58
  ]
59
  },
60
+ "execution_count": 4,
61
  "metadata": {},
62
  "output_type": "execute_result"
63
  }
 
68
  },
69
  {
70
  "cell_type": "code",
71
+ "execution_count": 5,
72
  "id": "9594c54a-c024-4492-af7b-f1c25bb4de6b",
73
  "metadata": {},
74
  "outputs": [
 
91
  "})"
92
  ]
93
  },
94
+ "execution_count": 5,
95
  "metadata": {},
96
  "output_type": "execute_result"
97
  }
 
102
  },
103
  {
104
  "cell_type": "code",
105
+ "execution_count": 6,
106
  "id": "ddda31eb-fdab-4ed3-81cc-88506ae0d7d5",
107
  "metadata": {},
108
  "outputs": [],
 
114
  },
115
  {
116
  "cell_type": "code",
117
+ "execution_count": 7,
118
  "id": "2b8918a3-5037-4062-b9cd-40b4a8a4d6c0",
119
  "metadata": {},
120
  "outputs": [
 
127
  "})"
128
  ]
129
  },
130
+ "execution_count": 7,
131
  "metadata": {},
132
  "output_type": "execute_result"
133
  }
 
138
  },
139
  {
140
  "cell_type": "code",
141
+ "execution_count": 8,
142
  "id": "fa6ca118-3df0-4b6b-a036-4c70544500e3",
143
  "metadata": {},
144
  "outputs": [
 
151
  "})"
152
  ]
153
  },
154
+ "execution_count": 8,
155
  "metadata": {},
156
  "output_type": "execute_result"
157
  }
 
163
  },
164
  {
165
  "cell_type": "code",
166
+ "execution_count": 9,
167
  "id": "0a56d781-5b5c-4deb-aa4f-c9a1a96ac650",
168
  "metadata": {},
169
+ "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  "source": [
171
  "complete_dataset = datasets.concatenate_datasets([raw_dataset_joined, joined_dataset_enrichment], axis=1)"
172
  ]
173
  },
174
  {
175
  "cell_type": "code",
176
+ "execution_count": 10,
177
  "id": "cb487431-8bc6-483a-bf25-a917278b6781",
178
  "metadata": {},
179
  "outputs": [
 
186
  "})"
187
  ]
188
  },
189
+ "execution_count": 10,
190
  "metadata": {},
191
  "output_type": "execute_result"
192
  }
 
197
  },
198
  {
199
  "cell_type": "code",
200
+ "execution_count": 13,
201
  "id": "a11fefeb-9fd1-4500-9b9f-3275207b1cde",
202
  "metadata": {},
203
  "outputs": [
204
  {
205
+ "ename": "TypeError",
206
+ "evalue": "'module' object is not callable",
207
+ "output_type": "error",
208
+ "traceback": [
209
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
210
+ "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
211
+ "Cell \u001b[0;32mIn[13], line 4\u001b[0m\n\u001b[1;32m 1\u001b[0m spotlight\u001b[38;5;241m.\u001b[39mshow(\n\u001b[1;32m 2\u001b[0m complete_dataset,\n\u001b[1;32m 3\u001b[0m \u001b[38;5;66;03m#layout= layout.parse(\"spotlight-layout.json\"),\u001b[39;00m\n\u001b[0;32m----> 4\u001b[0m layout\u001b[38;5;241m=\u001b[39m\u001b[43mspotlight\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlayouts\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmodel_debug\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m,\n\u001b[1;32m 5\u001b[0m port\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m7860\u001b[39m, \n\u001b[1;32m 6\u001b[0m host\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m0.0.0.0\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 7\u001b[0m allow_filebrowsing\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m \n\u001b[1;32m 8\u001b[0m )\n",
212
+ "\u001b[0;31mTypeError\u001b[0m: 'module' object is not callable"
213
  ]
214
  }
215
  ],
 
217
  "spotlight.show(\n",
218
  " complete_dataset,\n",
219
  " #layout= layout.parse(\"spotlight-layout.json\"),\n",
220
+ " layout=spotlight.layouts.debug_classification(),\n",
221
  " port=7860, \n",
222
  " host=\"0.0.0.0\",\n",
223
  " allow_filebrowsing=False \n",