Skip to content

Commit 33fdf4e

Browse files
authored
Style updates - cleaned up outputs
1 parent f43ffcb commit 33fdf4e

File tree

1 file changed

+48
-49
lines changed

1 file changed

+48
-49
lines changed

examples/basics/custom_embeddings.ipynb

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,26 @@
5050
},
5151
{
5252
"cell_type": "code",
53-
"execution_count": null,
53+
"execution_count": 1,
5454
"metadata": {
55-
"id": "wRIdzkYf7T18"
55+
"id": "wRIdzkYf7T18",
56+
"colab": {
57+
"base_uri": "https://localhost:8080/"
58+
},
59+
"outputId": "13ee42f0-4206-493f-f402-ac7c84916e5e"
5660
},
57-
"outputs": [],
61+
"outputs": [
62+
{
63+
"output_type": "stream",
64+
"name": "stdout",
65+
"text": [
66+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m189.2/189.2 KB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
67+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m52.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
68+
"\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
69+
" Building wheel for pygeotile (setup.py) ... \u001b[?25l\u001b[?25hdone\n"
70+
]
71+
}
72+
],
5873
"source": [
5974
"# labelbox\n",
6075
"!pip3 install -q labelbox[data]\n",
@@ -75,13 +90,13 @@
7590
},
7691
{
7792
"cell_type": "code",
78-
"execution_count": null,
93+
"execution_count": 2,
7994
"metadata": {
8095
"colab": {
8196
"base_uri": "https://localhost:8080/"
8297
},
8398
"id": "9k82ueIu8Dy1",
84-
"outputId": "cc728790-fc62-4d8d-a3e7-94739ffec809"
99+
"outputId": "5323157e-872b-4bf2-a65c-0fa9662cdbe8"
85100
},
86101
"outputs": [
87102
{
@@ -90,7 +105,9 @@
90105
"text": [
91106
" Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
92107
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
93-
" Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n"
108+
" Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
109+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.8/62.8 KB\u001b[0m \u001b[31m2.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
110+
"\u001b[?25h Building wheel for advlib (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n"
94111
]
95112
}
96113
],
@@ -136,7 +153,7 @@
136153
},
137154
{
138155
"cell_type": "code",
139-
"execution_count": null,
156+
"execution_count": 32,
140157
"metadata": {
141158
"id": "tOIyo5pC7PTz"
142159
},
@@ -161,7 +178,7 @@
161178
},
162179
{
163180
"cell_type": "code",
164-
"execution_count": null,
181+
"execution_count": 33,
165182
"metadata": {
166183
"id": "iJFGf0w7swnW"
167184
},
@@ -193,37 +210,20 @@
193210
},
194211
{
195212
"cell_type": "code",
196-
"execution_count": null,
213+
"execution_count": 35,
197214
"metadata": {
198215
"id": "u0ZgybLK67n0",
199216
"colab": {
200217
"base_uri": "https://localhost:8080/"
201218
},
202-
"outputId": "d644f81a-014e-4de9-913a-74211972e9b2"
219+
"outputId": "7e1991a0-8e0a-4e63-e8d8-dfdcf095a625"
203220
},
204221
"outputs": [
205222
{
206223
"output_type": "stream",
207224
"name": "stdout",
208225
"text": [
209-
"Nb of custom embedding vectors in sanity_check_payload: 1000\n",
210-
"sanity_check_payload: "
211-
]
212-
},
213-
{
214-
"output_type": "stream",
215-
"name": "stderr",
216-
"text": [
217-
"IOPub data rate exceeded.\n",
218-
"The notebook server will temporarily stop sending output\n",
219-
"to the client in order to avoid crashing it.\n",
220-
"To change this limit, set the config variable\n",
221-
"`--NotebookApp.iopub_data_rate_limit`.\n",
222-
"\n",
223-
"Current values:\n",
224-
"NotebookApp.iopub_data_rate_limit=1000000.0 (bytes/sec)\n",
225-
"NotebookApp.rate_limit_window=3.0 (secs)\n",
226-
"\n"
226+
"Nb of custom embedding vectors in sanity_check_payload: 1000\n"
227227
]
228228
}
229229
],
@@ -251,13 +251,13 @@
251251
},
252252
{
253253
"cell_type": "code",
254-
"execution_count": null,
254+
"execution_count": 46,
255255
"metadata": {
256256
"colab": {
257257
"base_uri": "https://localhost:8080/"
258258
},
259259
"id": "YQeCS_U98BD2",
260-
"outputId": "178dc3be-6e89-4df8-ec3d-2fa6dacc0be0"
260+
"outputId": "cdeb0bc7-9ea1-4864-88ff-122f6dab8af4"
261261
},
262262
"outputs": [
263263
{
@@ -266,9 +266,8 @@
266266
"text": [
267267
"00000000-0000-0000-0000-000000000000 - Image Embedding (CLIP ViT-B/32) - dims: 512 \n",
268268
"00000000-0000-0000-0000-000000000001 - Text embedding (All-MPNet-base-v2) - dims: 768 \n",
269-
"521eadfe-f8e9-4135-9ead-fef8e9713546 - my_custom_embedding_2048_dimensions - dims: 2048 \n",
270-
"a03948c1-151a-4a1a-b948-c1151a6a1a1d - ResNet50_2048_dimensions - dims: 2048 \n",
271-
"baf8856a-e5f7-4781-b885-6ae5f7b78192 - my_custom_embedding - dims: 8 \n"
269+
"45cafc7a-5314-462a-8afc-7a5314062a3b - my_custom_embedding_2048_dimensions - dims: 2048 \n",
270+
"7d3a6118-589d-4b6c-ba61-18589dbb6ccf - ResNet50_2048_dimensions - dims: 2048 \n"
272271
]
273272
}
274273
],
@@ -279,34 +278,34 @@
279278
},
280279
{
281280
"cell_type": "code",
282-
"execution_count": null,
281+
"execution_count": 47,
283282
"metadata": {
284283
"colab": {
285284
"base_uri": "https://localhost:8080/"
286285
},
287286
"id": "spyHzkLP67dI",
288-
"outputId": "21b6fda1-7a38-4bd5-d244-dfc90b8a5090"
287+
"outputId": "8a046562-5eb1-4fb1-8f23-6958f8b58e1f"
289288
},
290289
"outputs": [
291290
{
292291
"output_type": "stream",
293292
"name": "stdout",
294293
"text": [
295-
"Embedding type created id=521eadfe-f8e9-4135-9ead-fef8e9713546\n"
294+
"Embedding type created id=da5d4b0f-e440-4e2e-9d4b-0fe4400e2e8d\n"
296295
]
297296
}
298297
],
299298
"source": [
300299
"# # Create a new custom embedding\n",
301-
"!advtool embeddings create my_custom_embedding_2048_dimensions 2048\n",
300+
"!advtool embeddings create my_custom_embedding_2048_dimensions_v2 2048\n",
302301
"# will return the ID of the newly created embedding, e.g. 0ddc5d5c-0963-41ad-9c5d-5c0963a1ad98"
303302
]
304303
},
305304
{
306305
"cell_type": "code",
307306
"source": [
308307
"# # Delete a custom embedding\n",
309-
"# !advtool embeddings delete 521eadfe-f8e9-4135-9ead-fef8e9713546"
308+
"# !advtool embeddings delete 2e122b85-7def-44fb-922b-857defe4fb8a"
310309
],
311310
"metadata": {
312311
"id": "MafxKyncxyvR"
@@ -325,13 +324,13 @@
325324
},
326325
{
327326
"cell_type": "code",
328-
"execution_count": null,
327+
"execution_count": 49,
329328
"metadata": {
330329
"colab": {
331330
"base_uri": "https://localhost:8080/"
332331
},
333332
"id": "twDd5XNM67Zo",
334-
"outputId": "a7715fe7-3fc3-43d0-8316-bbc45a7dee60"
333+
"outputId": "cb4573de-5417-449b-b560-9f99cfe6eda4"
335334
},
336335
"outputs": [
337336
{
@@ -345,43 +344,43 @@
345344
}
346345
],
347346
"source": [
348-
"# Upload the payload to Labelbox\n",
349-
"!advtool embeddings import 521eadfe-f8e9-4135-9ead-fef8e9713546 ./payload.ndjson"
347+
"# Upload the payload to Labelbox \n",
348+
"!advtool embeddings import da5d4b0f-e440-4e2e-9d4b-0fe4400e2e8d ./payload.ndjson"
350349
]
351350
},
352351
{
353352
"cell_type": "code",
354-
"execution_count": null,
353+
"execution_count": 63,
355354
"metadata": {
356355
"colab": {
357356
"base_uri": "https://localhost:8080/"
358357
},
359358
"id": "wC0eeEPM9aAM",
360-
"outputId": "5889b2f8-1a07-4748-b3bf-efab545f1417"
359+
"outputId": "55932ddf-2dde-48c1-fd90-29532b8cfdf2"
361360
},
362361
"outputs": [
363362
{
364363
"output_type": "stream",
365364
"name": "stdout",
366365
"text": [
367-
"0\n"
366+
"1000\n"
368367
]
369368
}
370369
],
371370
"source": [
372-
"# count how many data rows have a specific custom embedding\n",
373-
"!advtool embeddings count 521eadfe-f8e9-4135-9ead-fef8e9713546"
371+
"# count how many data rows have a specific custom embedding (This can take a couple of minutes)\n",
372+
"!advtool embeddings count da5d4b0f-e440-4e2e-9d4b-0fe4400e2e8d"
374373
]
375374
},
376375
{
377376
"cell_type": "code",
378-
"execution_count": null,
377+
"execution_count": 64,
379378
"metadata": {
380379
"colab": {
381380
"base_uri": "https://localhost:8080/"
382381
},
383382
"id": "5AKDMJfO9Z51",
384-
"outputId": "b3b6e7ca-1e99-4563-d8fe-038375008b69"
383+
"outputId": "207f251f-0350-451e-ffcb-661cafb0529f"
385384
},
386385
"outputs": [
387386
{

0 commit comments

Comments
 (0)