Skip to content

Commit ff0bea4

Browse files
author
Matt Sokoloff
committed
clear notebook cells
1 parent 2c4afa3 commit ff0bea4

File tree

1 file changed

+28
-148
lines changed

1 file changed

+28
-148
lines changed

examples/model_diagnostics/model_diagnostics_demo.ipynb

Lines changed: 28 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
},
8181
{
8282
"cell_type": "code",
83-
"execution_count": 2,
83+
"execution_count": null,
8484
"id": "wooden-worship",
8585
"metadata": {
8686
"id": "wooden-worship"
@@ -108,22 +108,12 @@
108108
},
109109
{
110110
"cell_type": "code",
111-
"execution_count": 1,
111+
"execution_count": null,
112112
"id": "committed-richards",
113113
"metadata": {
114114
"id": "committed-richards"
115115
},
116-
"outputs": [
117-
{
118-
"name": "stderr",
119-
"output_type": "stream",
120-
"text": [
121-
"2021-09-13 09:27:18.654668: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set\n",
122-
"2021-09-13 09:27:18.655024: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA\n",
123-
"To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\n"
124-
]
125-
}
126-
],
116+
"outputs": [],
127117
"source": [
128118
"import sys\n",
129119
"sys.path.append('../model_assisted_labeling')\n",
@@ -176,7 +166,7 @@
176166
},
177167
{
178168
"cell_type": "code",
179-
"execution_count": 3,
169+
"execution_count": null,
180170
"id": "economic-chase",
181171
"metadata": {
182172
"id": "economic-chase"
@@ -191,38 +181,20 @@
191181
},
192182
{
193183
"cell_type": "code",
194-
"execution_count": 4,
184+
"execution_count": null,
195185
"id": "affecting-myanmar",
196186
"metadata": {
197187
"id": "affecting-myanmar"
198188
},
199-
"outputs": [
200-
{
201-
"name": "stdout",
202-
"output_type": "stream",
203-
"text": [
204-
"WARNING:tensorflow:From ../model_assisted_labeling/image_model.py:17: load (from tensorflow.python.saved_model.loader_impl) is deprecated and will be removed in a future version.\n",
205-
"Instructions for updating:\n",
206-
"This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.loader.load or tf.compat.v1.saved_model.load. There will be a new function for importing SavedModels in Tensorflow 2.0.\n",
207-
"INFO:tensorflow:Restoring parameters from gs://cloud-tpu-checkpoints/mask-rcnn/1555659850/variables/variables\n"
208-
]
209-
},
210-
{
211-
"name": "stderr",
212-
"output_type": "stream",
213-
"text": [
214-
"2021-09-13 09:27:38.928229: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:196] None of the MLIR optimization passes are enabled (registered 0 passes)\n"
215-
]
216-
}
217-
],
189+
"outputs": [],
218190
"source": [
219191
"client = Client(api_key=API_KEY)\n",
220192
"load_model() # initialize Tensorflow Model"
221193
]
222194
},
223195
{
224196
"cell_type": "code",
225-
"execution_count": 5,
197+
"execution_count": null,
226198
"id": "modern-program",
227199
"metadata": {
228200
"id": "modern-program"
@@ -260,7 +232,7 @@
260232
},
261233
{
262234
"cell_type": "code",
263-
"execution_count": 6,
235+
"execution_count": null,
264236
"id": "blank-flower",
265237
"metadata": {},
266238
"outputs": [],
@@ -274,27 +246,12 @@
274246
},
275247
{
276248
"cell_type": "code",
277-
"execution_count": 7,
249+
"execution_count": null,
278250
"id": "asian-savings",
279251
"metadata": {
280252
"id": "asian-savings"
281253
},
282-
"outputs": [
283-
{
284-
"data": {
285-
"application/vnd.jupyter.widget-view+json": {
286-
"model_id": "8178b64dc1864f4f833a29b904b7b5e1",
287-
"version_major": 2,
288-
"version_minor": 0
289-
},
290-
"text/plain": [
291-
" 0%| | 0/10 [00:00<?, ?it/s]"
292-
]
293-
},
294-
"metadata": {},
295-
"output_type": "display_data"
296-
}
297-
],
254+
"outputs": [],
298255
"source": [
299256
"predictions = LabelList()\n",
300257
"for (image_url, external_id) in notebook.tqdm(image_data[:10]):\n",
@@ -332,7 +289,7 @@
332289
},
333290
{
334291
"cell_type": "code",
335-
"execution_count": 8,
292+
"execution_count": null,
336293
"id": "received-nigeria",
337294
"metadata": {},
338295
"outputs": [],
@@ -349,19 +306,10 @@
349306
},
350307
{
351308
"cell_type": "code",
352-
"execution_count": 9,
309+
"execution_count": null,
353310
"id": "stopped-phrase",
354311
"metadata": {},
355-
"outputs": [
356-
{
357-
"name": "stdout",
358-
"output_type": "stream",
359-
"text": [
360-
"Setting up: Diagnostics Demo\n",
361-
"Dataset Created: cktiom65aclzm0y896zeua5ne\n"
362-
]
363-
}
364-
],
312+
"outputs": [],
365313
"source": [
366314
"print(f\"Setting up: {PROJECT_NAME}\")\n",
367315
"\n",
@@ -388,30 +336,10 @@
388336
},
389337
{
390338
"cell_type": "code",
391-
"execution_count": 10,
339+
"execution_count": null,
392340
"id": "unavailable-egyptian",
393341
"metadata": {},
394-
"outputs": [
395-
{
396-
"name": "stderr",
397-
"output_type": "stream",
398-
"text": [
399-
"10it [00:00, 63358.07it/s]\n",
400-
"10it [00:00, 76818.75it/s]\n",
401-
"10it [00:00, 60963.72it/s]\n"
402-
]
403-
},
404-
{
405-
"data": {
406-
"text/plain": [
407-
"<labelbox.data.annotation_types.collection.LabelList at 0x17c27fdc0>"
408-
]
409-
},
410-
"execution_count": 10,
411-
"metadata": {},
412-
"output_type": "execute_result"
413-
}
414-
],
342+
"outputs": [],
415343
"source": [
416344
"signer = lambda _bytes: client.upload_data(content=_bytes, sign=True)\n",
417345
"predictions.add_url_to_masks(signer) \\\n",
@@ -436,21 +364,12 @@
436364
},
437365
{
438366
"cell_type": "code",
439-
"execution_count": 11,
367+
"execution_count": null,
440368
"id": "subject-painting",
441369
"metadata": {
442370
"id": "subject-painting"
443371
},
444-
"outputs": [
445-
{
446-
"name": "stdout",
447-
"output_type": "stream",
448-
"text": [
449-
"AnnotationImportState.FINISHED \n",
450-
"\n"
451-
]
452-
}
453-
],
372+
"outputs": [],
454373
"source": [
455374
"RUN_MAL = True\n",
456375
"if RUN_MAL:\n",
@@ -464,20 +383,12 @@
464383
},
465384
{
466385
"cell_type": "code",
467-
"execution_count": 12,
386+
"execution_count": null,
468387
"id": "MV4U1W4H_eMq",
469388
"metadata": {
470389
"id": "MV4U1W4H_eMq"
471390
},
472-
"outputs": [
473-
{
474-
"name": "stdout",
475-
"output_type": "stream",
476-
"text": [
477-
"https://app.labelbox.com/go-label/cktiom4y2czqg0y9u9qqfdvhk\n"
478-
]
479-
}
480-
],
391+
"outputs": [],
481392
"source": [
482393
"print(f\"https://app.labelbox.com/go-label/{project.uid}\")"
483394
]
@@ -496,7 +407,7 @@
496407
},
497408
{
498409
"cell_type": "code",
499-
"execution_count": 13,
410+
"execution_count": null,
500411
"id": "excited-seminar",
501412
"metadata": {
502413
"id": "excited-seminar"
@@ -519,7 +430,7 @@
519430
},
520431
{
521432
"cell_type": "code",
522-
"execution_count": 14,
433+
"execution_count": null,
523434
"id": "mental-minnesota",
524435
"metadata": {
525436
"id": "mental-minnesota"
@@ -542,23 +453,12 @@
542453
},
543454
{
544455
"cell_type": "code",
545-
"execution_count": 15,
456+
"execution_count": null,
546457
"id": "static-coordinate",
547458
"metadata": {
548459
"id": "static-coordinate"
549460
},
550-
"outputs": [
551-
{
552-
"data": {
553-
"text/plain": [
554-
"True"
555-
]
556-
},
557-
"execution_count": 15,
558-
"metadata": {},
559-
"output_type": "execute_result"
560-
}
561-
],
461+
"outputs": [],
562462
"source": [
563463
"lb_model_run.upsert_labels([label.uid for label in labels])"
564464
]
@@ -575,7 +475,7 @@
575475
},
576476
{
577477
"cell_type": "code",
578-
"execution_count": 16,
478+
"execution_count": null,
579479
"id": "committed-fairy",
580480
"metadata": {
581481
"id": "committed-fairy"
@@ -600,20 +500,12 @@
600500
},
601501
{
602502
"cell_type": "code",
603-
"execution_count": 17,
503+
"execution_count": null,
604504
"id": "anonymous-addition",
605505
"metadata": {
606506
"id": "anonymous-addition"
607507
},
608-
"outputs": [
609-
{
610-
"name": "stdout",
611-
"output_type": "stream",
612-
"text": [
613-
"AnnotationImportState.FINISHED\n"
614-
]
615-
}
616-
],
508+
"outputs": [],
617509
"source": [
618510
"upload_task = lb_model_run.add_predictions(f'diagnostics-import-{uuid.uuid4()}', NDJsonConverter.serialize(predictions))\n",
619511
"upload_task.wait_until_done()\n",
@@ -632,24 +524,12 @@
632524
},
633525
{
634526
"cell_type": "code",
635-
"execution_count": 18,
527+
"execution_count": null,
636528
"id": "zrll9K6Q9tGK",
637529
"metadata": {
638530
"id": "zrll9K6Q9tGK"
639531
},
640-
"outputs": [
641-
{
642-
"name": "stdout",
643-
"output_type": "stream",
644-
"text": [
645-
"https://app.labelbox.com/models/9c4cba6e-efb4-03f1-302e-d5718c4eca20/9c4cba6f-8ea1-0202-ec4e-528291bf932e/AllDatarowsSlice/25da00a5-e451-4dbd-824d-a0425ce94ffa?view=carousel\n",
646-
"https://app.labelbox.com/models/9c4cba6e-efb4-03f1-302e-d5718c4eca20/9c4cba6f-8ea1-0202-ec4e-528291bf932e/AllDatarowsSlice/3d20b8e6-5584-45fd-b0a4-021b3a16f25b?view=carousel\n",
647-
"https://app.labelbox.com/models/9c4cba6e-efb4-03f1-302e-d5718c4eca20/9c4cba6f-8ea1-0202-ec4e-528291bf932e/AllDatarowsSlice/45e6dab8-c55e-4761-b47f-5a1dd4204f4d?view=carousel\n",
648-
"https://app.labelbox.com/models/9c4cba6e-efb4-03f1-302e-d5718c4eca20/9c4cba6f-8ea1-0202-ec4e-528291bf932e/AllDatarowsSlice/746b2c7c-25e5-449e-8cce-50e4fcbb9ddd?view=carousel\n",
649-
"https://app.labelbox.com/models/9c4cba6e-efb4-03f1-302e-d5718c4eca20/9c4cba6f-8ea1-0202-ec4e-528291bf932e/AllDatarowsSlice/7c2bd1f4-7f31-48b4-bc0a-b99ed7533646?view=carousel\n"
650-
]
651-
}
652-
],
532+
"outputs": [],
653533
"source": [
654534
"for idx, annotation_group in enumerate(lb_model_run.annotation_groups()):\n",
655535
" if idx == 5:\n",

0 commit comments

Comments
 (0)