Skip to content

Commit aa62651

Browse files
ovalle15ovalle15Gabefiregithub-actions[bot]
authored
[DOCS-424] removed label typing for annotation/prediction import examples (#1606)
Co-authored-by: ovalle15 <aovalle@Andreas-MacBook-Pro-2.local> Co-authored-by: Gabe <33893811+Gabefire@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 6ca7fe9 commit aa62651

20 files changed

+93
-114
lines changed

examples/annotation_import/audio.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,7 @@
349349
"label = []\n",
350350
"label.append(\n",
351351
" lb_types.Label(\n",
352-
" data=lb_types.AudioData(\n",
353-
" global_key=global_key\n",
354-
" ),\n",
352+
" data={\"global_key\" : global_key },\n",
355353
" annotations=[\n",
356354
" text_annotation,\n",
357355
" checklist_annotation,\n",

examples/annotation_import/conversational.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,7 @@
495495
"label = []\n",
496496
"label.append(\n",
497497
" lb_types.Label(\n",
498-
" data=lb_types.ConversationData(\n",
499-
" global_key=global_key\n",
500-
" ),\n",
498+
" data={\"global_key\" : global_key },\n",
501499
" annotations=[\n",
502500
" ner_annotation,\n",
503501
" text_annotation,\n",

examples/annotation_import/conversational_LLM.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,7 @@
542542
"label = []\n",
543543
"label.append(\n",
544544
" lb_types.Label(\n",
545-
" data=lb_types.ConversationData(\n",
546-
" global_key=global_key\n",
547-
" ),\n",
545+
" data={\"global_key\" : global_key },\n",
548546
" annotations=[\n",
549547
" ner_annotation,\n",
550548
" text_annotation,\n",

examples/annotation_import/dicom.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343
"annotations_list = polyline_annotation + mask_annotation\n",
344344
"labels = [\n",
345345
" lb_types.Label(\n",
346-
" data=lb_types.DicomData(global_key=global_key),\n",
346+
" data={\"global_key\" : global_key },\n",
347347
" annotations=annotations_list\n",
348348
" )\n",
349349
"]"

examples/annotation_import/html.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,7 @@
454454
"label = []\n",
455455
"label.append(\n",
456456
" lb_types.Label(\n",
457-
" data=lb_types.HTMLData(\n",
458-
" global_key=global_key\n",
459-
" ),\n",
457+
" data={\"global_key\" : global_key },\n",
460458
" annotations=[\n",
461459
" text_annotation,\n",
462460
" checklist_annotation,\n",

examples/annotation_import/image.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@
938938
"] + cp_mask\n",
939939
"\n",
940940
"label.append(\n",
941-
" lb_types.Label(data=lb_types.ImageData(global_key=global_key),\n",
941+
" lb_types.Label(data={\"global_key\" : global_key },\n",
942942
" annotations=annotations))"
943943
],
944944
"cell_type": "code",

examples/annotation_import/import_labeled_dataset_image.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"metadata": {},
7171
"source": [
7272
"# Initialize the Labelbox client\n",
73-
"API_KEY = \"\" # Place API key\n",
73+
"API_KEY = \"\"\n",
7474
"client = lb.Client(API_KEY)"
7575
],
7676
"cell_type": "code",
@@ -376,7 +376,7 @@
376376
" name=class_name,\n",
377377
" value=Rectangle(start=Point(x=bbox[0], y=bbox[1]), end=Point(x=bbox[2]+bbox[0], y=bbox[3]+bbox[1]))\n",
378378
" ))\n",
379-
" image_data = ImageData(uid=data_row_dict['id'])\n",
379+
" image_data = {\"uid\":data_row_dict['id']}\n",
380380
" labels.append(Label(data=image_data, annotations=annotations_list))"
381381
],
382382
"cell_type": "code",

examples/annotation_import/pdf.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,8 +1024,7 @@
10241024
"\n",
10251025
"labels.append(\n",
10261026
" lb_types.Label(\n",
1027-
" data=lb_types.DocumentData(\n",
1028-
" global_key=global_key),\n",
1027+
" data={\"global_key\" : global_key },\n",
10291028
" annotations = [\n",
10301029
" entities_annotation,\n",
10311030
" checklist_annotation,\n",

examples/annotation_import/text.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,7 @@
492492
"labels = []\n",
493493
"labels.append(\n",
494494
" lb_types.Label(\n",
495-
" data=lb_types.TextData(\n",
496-
" global_key=global_key),\n",
495+
" data={\"global_key\" : global_key },\n",
497496
" annotations = [\n",
498497
" named_entitity_annotation,\n",
499498
" radio_annotation,\n",

examples/annotation_import/tiled.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -962,12 +962,12 @@
962962
"labels =[]\n",
963963
"labels.append(\n",
964964
" lb_types.Label(\n",
965-
" data=lb_types.TiledImageData(\n",
966-
" global_key=global_key,\n",
967-
" tile_layer=tile_layer,\n",
968-
" tile_bounds=bounds,\n",
969-
" zoom_levels=[12, 20]\n",
970-
" ),\n",
965+
" data={\n",
966+
" \"global_key\": global_key,\n",
967+
" \"tile_layer\": tile_layer,\n",
968+
" \"tile_bounds\":bounds,\n",
969+
" \"zoom_levels\": [12, 20]\n",
970+
" },\n",
971971
" annotations = [\n",
972972
" point_annotation,\n",
973973
" polyline_annotation,\n",

0 commit comments

Comments
 (0)