Skip to content

Commit e5bd2fb

Browse files
authored
Merge pull request #929 from Labelbox/VB/remove-uuid-notebooks_AL-4862
Vb/remove UUID notebooks al 4862
2 parents db4e5ba + aa17b01 commit e5bd2fb

File tree

14 files changed

+6
-33
lines changed

14 files changed

+6
-33
lines changed

examples/annotation_import/conversational.ipynb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@
383383
" checklist_annotation,\n",
384384
" radio_annotation]:\n",
385385
" annotations.update({\n",
386-
" 'uuid': str(uuid.uuid4()),\n",
387386
" 'dataRow': {\n",
388387
" 'id': data_row.uid\n",
389388
" }\n",
@@ -407,23 +406,19 @@
407406
"[{'name': 'ner',\n",
408407
" 'location': {'start': 0, 'end': 8},\n",
409408
" 'messageId': '4',\n",
410-
" 'uuid': 'ce5805b9-1353-432e-9f7a-38cdfa901d5d',\n",
411409
" 'dataRow': {'id': 'clc0ygvde029307yn96gv2byu'}},\n",
412410
" {'name': 'text_convo',\n",
413411
" 'answer': 'the answer to the text questions right here',\n",
414412
" 'messageId': '0',\n",
415-
" 'uuid': '2852bb2d-9355-42df-bb95-3db48247cbf7',\n",
416413
" 'dataRow': {'id': 'clc0ygvde029307yn96gv2byu'}},\n",
417414
" {'name': 'checklist_convo',\n",
418415
" 'answers': [{'name': 'first_checklist_answer'},\n",
419416
" {'name': 'second_checklist_answer'}],\n",
420417
" 'messageId': '2',\n",
421-
" 'uuid': '623fa806-166e-436b-8d1b-dbdc30f23ee5',\n",
422418
" 'dataRow': {'id': 'clc0ygvde029307yn96gv2byu'}},\n",
423419
" {'name': 'radio_convo',\n",
424420
" 'answer': {'name': 'first_radio_answer'},\n",
425421
" 'messageId': '0',\n",
426-
" 'uuid': 'a256e84a-5012-4fd4-833f-637935a22fd4',\n",
427422
" 'dataRow': {'id': 'clc0ygvde029307yn96gv2byu'}}]"
428423
]
429424
},

examples/annotation_import/image.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,6 @@
772772
"\n",
773773
" ]:\n",
774774
" annotation.update({\n",
775-
" 'uuid': str(uuid.uuid4()),\n",
776775
" 'dataRow': {'id': data_row.uid},\n",
777776
" })\n",
778777
" label_ndjson_method2.append(annotation)\n"

examples/annotation_import/pdf.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@
208208
"metadata": {},
209209
"source": [
210210
"ANNOTATION = {\n",
211-
" \"uuid\": str(uuid.uuid4()),\n",
212211
" \"name\" : tool_name,\n",
213212
" \"dataRow\": {\"id\": data_row_id.uid},\n",
214213
" \"textSelections\": [\n",

examples/annotation_import/text.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@
507507
" checklist_annotation_ndjson,\n",
508508
" text_annotation_ndjson] :\n",
509509
" annotations.update({\n",
510-
" 'uuid': str(uuid.uuid4()),\n",
511510
" 'dataRow': {\n",
512511
" 'id': data_row.uid\n",
513512
" }\n",

examples/annotation_import/tiled.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,6 @@
997997
" polygon_annotation_two_ndjson\n",
998998
" ]:\n",
999999
" annotations.update({\n",
1000-
" 'uuid' : str(uuid.uuid4()),\n",
10011000
" 'dataRow': {\n",
10021001
" 'id': next(dataset.export_data_rows()).uid\n",
10031002
" }\n",

examples/annotation_import/video.ipynb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,6 @@
675675
" frame_bbox_with_checklist_subclass_ndjson\n",
676676
" ]: \n",
677677
" annotations.update({\n",
678-
" 'uuid' : str(uuid.uuid4()),\n",
679678
" 'dataRow': {\n",
680679
" 'id': next(dataset.export_data_rows()).uid\n",
681680
" }\n",
@@ -699,7 +698,6 @@
699698
"[{'name': 'point_video',\n",
700699
" 'segments': [{'keyframes': [{'frame': 17,\n",
701700
" 'point': {'x': 660.134, 'y': 407.926}}]}],\n",
702-
" 'uuid': '9316e8dc-3b3f-4ce7-b1f3-d06e1caeb83c',\n",
703701
" 'dataRow': {'id': 'cldxj6yxi0a4o07yc8qkf0bvm'}},\n",
704702
" {'name': 'bbox_video',\n",
705703
" 'segments': [{'keyframes': [{'frame': 13,\n",
@@ -711,7 +709,6 @@
711709
" 'left': 98.0,\n",
712710
" 'height': 382.0,\n",
713711
" 'width': 341.0}}]}],\n",
714-
" 'uuid': '920af9d6-9ad5-4ae2-b2d4-6c34a0d63be5',\n",
715712
" 'dataRow': {'id': 'cldxj6yxi0a4o07yc8qkf0bvm'}},\n",
716713
" {'name': 'line_video_frame',\n",
717714
" 'segments': [{'keyframes': [{'frame': 5,\n",
@@ -729,30 +726,25 @@
729726
" {'keyframes': [{'frame': 24,\n",
730727
" 'line': [{'x': 300, 'y': 310}, {'x': 330, 'y': 430}]},\n",
731728
" {'frame': 45, 'line': [{'x': 600, 'y': 810}, {'x': 900, 'y': 930}]}]}],\n",
732-
" 'uuid': '9be4e3b9-c0e9-4a71-95a7-2aad35d4cc4c',\n",
733729
" 'dataRow': {'id': 'cldxj6yxi0a4o07yc8qkf0bvm'}},\n",
734730
" {'name': 'checklist_class',\n",
735731
" 'answer': [{'name': 'first_checklist_answer',\n",
736732
" 'frames': [{'start': 29, 'end': 35}, {'start': 48, 'end': 65}]},\n",
737733
" {'name': 'second_checklist_answer',\n",
738734
" 'frames': [{'start': 29, 'end': 35}, {'start': 48, 'end': 65}]}],\n",
739-
" 'uuid': '2be8bf17-94c1-4638-929b-41bd7f86e4bd',\n",
740735
" 'dataRow': {'id': 'cldxj6yxi0a4o07yc8qkf0bvm'}},\n",
741736
" {'name': 'radio_class_global',\n",
742737
" 'answer': {'name': 'first_radio_answer'},\n",
743-
" 'uuid': 'df230cdc-dbb7-4142-a53a-8c662f32b713',\n",
744738
" 'dataRow': {'id': 'cldxj6yxi0a4o07yc8qkf0bvm'}},\n",
745739
" {'name': 'radio_question_nested',\n",
746740
" 'answer': {'name': 'first_radio_question'},\n",
747741
" 'classifications': [{'name': 'sub_question_radio',\n",
748742
" 'answer': {'name': 'sub_answer'}}],\n",
749-
" 'uuid': 'f7b24fee-005c-4a22-a52a-b2c6fcc94db4',\n",
750743
" 'dataRow': {'id': 'cldxj6yxi0a4o07yc8qkf0bvm'}},\n",
751744
" {'name': 'nested_checklist_question',\n",
752745
" 'answer': [{'name': 'first_checklist_answer',\n",
753746
" 'classifications': [{'name': 'sub_checklist_question',\n",
754747
" 'answer': {'name': 'first_sub_checklist_answer'}}]}],\n",
755-
" 'uuid': '691792f8-0627-4a37-8ef4-81691d3f1d78',\n",
756748
" 'dataRow': {'id': 'cldxj6yxi0a4o07yc8qkf0bvm'}},\n",
757749
" {'name': 'bbox_class',\n",
758750
" 'segments': [{'keyframes': [{'frame': 10,\n",
@@ -767,7 +759,6 @@
767759
" 'bbox': {'top': 146.0, 'left': 98.0, 'height': 382.0, 'width': 341.0},\n",
768760
" 'classifications': [{'schemaId': 'cldxj6zy80cw307vdgapmcu4e',\n",
769761
" 'answer': {'schemaId': 'cldxj6zy80cw407vd1ynfckwg'}}]}]}],\n",
770-
" 'uuid': '1d445aa2-e348-4b49-bb23-2cae52293af8',\n",
771762
" 'dataRow': {'id': 'cldxj6yxi0a4o07yc8qkf0bvm'}}]"
772763
]
773764
},

examples/integrations/detectron2/coco_object.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
" feature_miou_metric, \n",
117117
" feature_confusion_matrix_metric\n",
118118
")\n",
119+
"from labelbox.data.metrics.group import get_label_pairs\n",
119120
"\n",
120121
"with open('./coco_utils.py', 'w' ) as file:\n",
121122
" helper = requests.get(\"https://raw.githubusercontent.com/Labelbox/labelbox-python/master/examples/integrations/detectron2/coco_utils.py\").text\n",

examples/integrations/detectron2/coco_panoptic.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@
10141014
" for future in tqdm(as_completed(futures)):\n",
10151015
" labels.append(future.result())\n",
10161016
"\n",
1017-
"labels_mea = LabelGenerator(labels)\n",
1017+
"labels_mea = lb_types.LabelGenerator(labels)\n",
10181018
"labels_mea.add_url_to_masks(signer) \\\n",
10191019
" .add_url_to_data(signer) "
10201020
],

examples/integrations/tlt/labelbox_upload.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@
285285
"for datarow in datarows:\n",
286286
" label = get_labels(datarow)['coords'][0]\n",
287287
" row = {\n",
288-
" 'uuid' : str(uuid.uuid4()),\n",
289288
" 'name' : 'animal',\n",
290289
" 'dataRow' : {'id' : datarow.uid},\n",
291290
" 'bbox' : {\n",

examples/prediction_upload/geospatial_predictions.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@
675675
"\n",
676676
"Create the annotations payload using the snippets in the **Supported Predictions Section**. \n",
677677
"\n",
678-
"The resulting label_ndjson should have exactly the same content for annotations that are supported by both (with exception of the uuid strings that are generated)"
678+
"The resulting label_ndjson should have exactly the same content for annotations that are supported by both"
679679
],
680680
"cell_type": "markdown"
681681
},
@@ -808,7 +808,6 @@
808808
" polygon_prediction_two_ndjson\n",
809809
"]:\n",
810810
" prediction.update({\n",
811-
" 'uuid': str(uuid.uuid4()),\n",
812811
" 'dataRow': {'id': data_row.uid},\n",
813812
" })\n",
814813
" label_ndjson_method_2.append(prediction)"

0 commit comments

Comments
 (0)