Skip to content

Commit b738bf7

Browse files
Erin LiuErin Liu
authored andcommitted
clear outputs/inputs
1 parent 1cdff4a commit b738bf7

File tree

1 file changed

+21
-118
lines changed

1 file changed

+21
-118
lines changed

examples/project_configuration/webhooks.ipynb

Lines changed: 21 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
{
2525
"cell_type": "code",
26-
"execution_count": 1,
26+
"execution_count": null,
2727
"id": "authentic-necessity",
2828
"metadata": {},
2929
"outputs": [],
@@ -38,7 +38,7 @@
3838
},
3939
{
4040
"cell_type": "code",
41-
"execution_count": 2,
41+
"execution_count": null,
4242
"id": "responsible-clinton",
4343
"metadata": {},
4444
"outputs": [],
@@ -58,7 +58,7 @@
5858
},
5959
{
6060
"cell_type": "code",
61-
"execution_count": 3,
61+
"execution_count": null,
6262
"id": "foreign-theorem",
6363
"metadata": {},
6464
"outputs": [],
@@ -82,20 +82,20 @@
8282
},
8383
{
8484
"cell_type": "code",
85-
"execution_count": 4,
85+
"execution_count": null,
8686
"id": "satellite-impossible",
8787
"metadata": {},
8888
"outputs": [],
8989
"source": [
9090
"# Set this to a project that you want to use for the webhook\n",
91-
"PROJECT_ID = \"ckm4xyfncfgja0760vpfdxoro\"\n",
91+
"PROJECT_ID = \"\"\n",
9292
"# Only update this if you have an on-prem deployment\n",
9393
"ENDPOINT = \"https://api.labelbox.com/graphql\""
9494
]
9595
},
9696
{
9797
"cell_type": "code",
98-
"execution_count": 5,
98+
"execution_count": null,
9999
"id": "clean-ireland",
100100
"metadata": {},
101101
"outputs": [],
@@ -105,7 +105,7 @@
105105
},
106106
{
107107
"cell_type": "code",
108-
"execution_count": 6,
108+
"execution_count": null,
109109
"id": "bacterial-cheat",
110110
"metadata": {},
111111
"outputs": [],
@@ -132,21 +132,10 @@
132132
},
133133
{
134134
"cell_type": "code",
135-
"execution_count": 7,
135+
"execution_count": null,
136136
"id": "aboriginal-antibody",
137137
"metadata": {},
138-
"outputs": [
139-
{
140-
"data": {
141-
"text/plain": [
142-
"0"
143-
]
144-
},
145-
"execution_count": 6,
146-
"metadata": {},
147-
"output_type": "execute_result"
148-
}
149-
],
138+
"outputs": [],
150139
"source": [
151140
"if not COLAB:\n",
152141
" os.system(f\"ngrok http {WH_PORT} &\")"
@@ -162,7 +151,7 @@
162151
},
163152
{
164153
"cell_type": "code",
165-
"execution_count": 8,
154+
"execution_count": null,
166155
"id": "stable-group",
167156
"metadata": {},
168157
"outputs": [],
@@ -173,7 +162,7 @@
173162
},
174163
{
175164
"cell_type": "code",
176-
"execution_count": 9,
165+
"execution_count": null,
177166
"id": "limiting-variety",
178167
"metadata": {},
179168
"outputs": [],
@@ -219,26 +208,10 @@
219208
},
220209
{
221210
"cell_type": "code",
222-
"execution_count": 10,
211+
"execution_count": null,
223212
"id": "delayed-convention",
224213
"metadata": {},
225-
"outputs": [
226-
{
227-
"name": "stderr",
228-
"output_type": "stream",
229-
"text": [
230-
" * Running on http://0.0.0.0:3001/ (Press CTRL+C to quit)\n",
231-
"127.0.0.1 - - [29/Mar/2021 16:54:32] \"\u001b[37mGET / HTTP/1.1\u001b[0m\" 200 -\n"
232-
]
233-
},
234-
{
235-
"name": "stdout",
236-
"output_type": "stream",
237-
"text": [
238-
"Hello, World!\n"
239-
]
240-
}
241-
],
214+
"outputs": [],
242215
"source": [
243216
"print(requests.get(\"http://localhost:3001\").text)"
244217
]
@@ -262,7 +235,7 @@
262235
},
263236
{
264237
"cell_type": "code",
265-
"execution_count": 11,
238+
"execution_count": null,
266239
"id": "biblical-scottish",
267240
"metadata": {},
268241
"outputs": [],
@@ -284,7 +257,7 @@
284257
},
285258
{
286259
"cell_type": "code",
287-
"execution_count": 12,
260+
"execution_count": null,
288261
"id": "raising-preservation",
289262
"metadata": {},
290263
"outputs": [],
@@ -301,18 +274,10 @@
301274
},
302275
{
303276
"cell_type": "code",
304-
"execution_count": 13,
277+
"execution_count": null,
305278
"id": "approximate-gothic",
306279
"metadata": {},
307-
"outputs": [
308-
{
309-
"name": "stdout",
310-
"output_type": "stream",
311-
"text": [
312-
"https://app.labelbox.com/projects/ckm4xyfncfgja0760vpfdxoro\n"
313-
]
314-
}
315-
],
280+
"outputs": [],
316281
"source": [
317282
"# Ok so we should be configured assuming everything is setup correctly.\n",
318283
"# Go to the following url and make a new label to see if it works\n",
@@ -321,7 +286,7 @@
321286
},
322287
{
323288
"cell_type": "code",
324-
"execution_count": 14,
289+
"execution_count": null,
325290
"id": "worst-material",
326291
"metadata": {},
327292
"outputs": [],
@@ -339,72 +304,10 @@
339304
},
340305
{
341306
"cell_type": "code",
342-
"execution_count": 15,
307+
"execution_count": null,
343308
"id": "stopped-steel",
344309
"metadata": {},
345-
"outputs": [
346-
{
347-
"name": "stdout",
348-
"output_type": "stream",
349-
"text": [
350-
"https://eb3e7f8eb089.ngrok.io/webhook-endpoint\n"
351-
]
352-
},
353-
{
354-
"name": "stderr",
355-
"output_type": "stream",
356-
"text": [
357-
"127.0.0.1 - - [17/Mar/2021 09:52:00] \"\u001b[37mPOST /webhook-endpoint HTTP/1.1\u001b[0m\" 200 -\n"
358-
]
359-
},
360-
{
361-
"name": "stdout",
362-
"output_type": "stream",
363-
"text": [
364-
"=========== New Webhook Delivery ============\n",
365-
"Delivery ID: ckmdi74ew57lq063553kuzekq\n",
366-
"Event: LABEL_UPDATED\n",
367-
"Payload: {\n",
368-
" \"id\": \"ckmb8h50t008f3h683tugqsap\",\n",
369-
" \"createdAt\": \"2021-03-15T23:44:18Z\",\n",
370-
" \"updatedAt\": \"2021-03-17T13:51:59Z\",\n",
371-
" \"secondsToLabel\": 79.173,\n",
372-
" \"label\": \"{\\\"objects\\\":[{\\\"featureId\\\":\\\"ckmb8gvd9008b3h68l5tcmrt1\\\",\\\"schemaId\\\":\\\"ckm3se1a5010y0y6rcdc0bvvl\\\",\\\"title\\\":\\\"animal\\\",\\\"value\\\":\\\"animal\\\",\\\"color\\\":\\\"#1CE6FF\\\",\\\"bbox\\\":{\\\"top\\\":325,\\\"left\\\":233,\\\"height\\\":266,\\\"width\\\":413},\\\"instanceURI\\\":\\\"https://api.labelbox.com/masks/feature/ckmb8gvd9008b3h68l5tcmrt1\\\"},{\\\"featureId\\\":\\\"ckmbdp94300013h68y14zluto\\\",\\\"schemaId\\\":\\\"ckmbdol5s1ybk0y96fje86ktu\\\",\\\"title\\\":\\\"human\\\",\\\"value\\\":\\\"human\\\",\\\"color\\\":\\\"#FF34FF\\\",\\\"bbox\\\":{\\\"top\\\":75,\\\"left\\\":527,\\\"height\\\":453,\\\"width\\\":155},\\\"instanceURI\\\":\\\"https://api.labelbox.com/masks/feature/ckmbdp94300013h68y14zluto\\\"},{\\\"featureId\\\":\\\"ckmbdpdda00043h688pqrsoku\\\",\\\"schemaId\\\":\\\"ckmbdol5s1ybk0y96fje86ktu\\\",\\\"title\\\":\\\"human\\\",\\\"value\\\":\\\"human\\\",\\\"color\\\":\\\"#FF34FF\\\",\\\"bbox\\\":{\\\"top\\\":81,\\\"left\\\":666,\\\"height\\\":396,\\\"width\\\":134},\\\"instanceURI\\\":\\\"https://api.labelbox.com/masks/feature/ckmbdpdda00043h688pqrsoku\\\"},{\\\"featureId\\\":\\\"ckmbdpgd200073h68cu3vhjf2\\\",\\\"schemaId\\\":\\\"ckmbdol5s1ybk0y96fje86ktu\\\",\\\"title\\\":\\\"human\\\",\\\"value\\\":\\\"human\\\",\\\"color\\\":\\\"#FF34FF\\\",\\\"bbox\\\":{\\\"top\\\":0,\\\"left\\\":722,\\\"height\\\":535,\\\"width\\\":259},\\\"instanceURI\\\":\\\"https://api.labelbox.com/masks/feature/ckmbdpgd200073h68cu3vhjf2\\\"},{\\\"featureId\\\":\\\"ckmdi72l700043g68i52bq31i\\\",\\\"schemaId\\\":\\\"ckm3se1a5010y0y6rcdc0bvvl\\\",\\\"title\\\":\\\"animal\\\",\\\"value\\\":\\\"animal\\\",\\\"color\\\":\\\"#1CE6FF\\\",\\\"bbox\\\":{\\\"top\\\":94,\\\"left\\\":65,\\\"height\\\":104,\\\"width\\\":67},\\\"instanceURI\\\":\\\"https://api.labelbox.com/masks/feature/ckmdi72l700043g68i52bq31i\\\"}],\\\"classifications\\\":[{\\\"featureId\\\":\\\"ckmb8h0t7008e3h68hhmuf3y4\\\",\\\"schemaId\\\":\\\"ckm3se1a4010w0y6rd579gyl3\\\",\\\"title\\\":\\\"image\\\",\\\"value\\\":\\\"image\\\",\\\"answers\\\":[{\\\"featureId\\\":\\\"ckmb8h0t6008d3h689yq6cnm6\\\",\\\"schemaId\\\":\\\"ckm3se1aw01120y6r7zkcd93v\\\",\\\"title\\\":\\\"contains_human\\\",\\\"value\\\":\\\"contains_human\\\"}]}]}\",\n",
373-
" \"agreement\": null,\n",
374-
" \"benchmarkAgreement\": null,\n",
375-
" \"deleted\": false,\n",
376-
" \"project\": {\n",
377-
" \"id\": \"ckm4xyfncfgja0760vpfdxoro\",\n",
378-
" \"createdAt\": \"2021-03-11T14:03:12Z\",\n",
379-
" \"updatedAt\": \"2021-03-11T18:22:08.523Z\",\n",
380-
" \"name\": \"animal_demo_proj\",\n",
381-
" \"description\": \"\",\n",
382-
" \"deleted\": false\n",
383-
" },\n",
384-
" \"dataRow\": {\n",
385-
" \"id\": \"ckm4y6s5a1s7e0rb6bgf00oqa\",\n",
386-
" \"createdAt\": \"2021-03-11T14:09:41Z\",\n",
387-
" \"updatedAt\": \"2021-03-11T14:09:41Z\",\n",
388-
" \"deletedAt\": null,\n",
389-
" \"externalId\": \"uploaded_images/177.jpg\",\n",
390-
" \"rowData\": \"https://storage.labelbox.com/ckk4q1vgapsau07324awnsjq2%2F7b7f4198-3ea4-68db-9bf7-01dfd0bf3e8c-177.jpg?Expires=1617198719&KeyName=labelbox-assets-key-1&Signature=9mjtUoc61rooqsI8I2unQNU4N-o=\"\n",
391-
" },\n",
392-
" \"dataset\": {\n",
393-
" \"id\": \"ckm4xyfua04cf0z7a3wz58kgj\",\n",
394-
" \"createdAt\": \"2021-03-11T14:03:12Z\",\n",
395-
" \"updatedAt\": \"2021-03-11T14:03:12Z\",\n",
396-
" \"name\": \"animal_demo_ds\",\n",
397-
" \"description\": \"\",\n",
398-
" \"deleted\": false\n",
399-
" },\n",
400-
" \"user\": {\n",
401-
" \"id\": \"ckm570mgm7q880795an0rfzmz\",\n",
402-
" \"email\": \"amanda+1@labelbox.com\"\n",
403-
" }\n",
404-
"}\n"
405-
]
406-
}
407-
],
310+
"outputs": [],
408311
"source": [
409312
"# url, topics, and status can all be updated\n",
410313
"updated_url = f\"{public_url}/webhook-endpoint\"\n",
@@ -425,7 +328,7 @@
425328
},
426329
{
427330
"cell_type": "code",
428-
"execution_count": 16,
331+
"execution_count": null,
429332
"id": "distant-commitment",
430333
"metadata": {},
431334
"outputs": [],

0 commit comments

Comments
 (0)