Skip to content

Commit 7da2e88

Browse files
authored
Merge pull request #888 from Labelbox/imuhammad/AL-4764-fix-notebooks
Revert [AL-4764] changes to notebooks
2 parents a356b0c + 2f0a35c commit 7da2e88

File tree

14 files changed

+83
-75
lines changed

14 files changed

+83
-75
lines changed

examples/annotation_import/conversational.ipynb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@
295295
"cell_type": "markdown",
296296
"source": [
297297
"## Step 2: Create/select an ontology\n",
298-
"Your project should have the correct ontology setup with all the tools and classifications supported for your annotations, and the tool and classification names should match the `name` field in your annotations to ensure the correct feature schemas are matched.\n",
298+
"\n",
299+
"Your project should have the correct ontology setup with all the tools and classifications supported for your annotations, and the tool names and classification instructions should match the `name`/`instructions` fields in your annotations to ensure the correct feature schemas are matched.\n",
299300
"\n",
300301
"For example, when we create the bounding box annotation [above](https://colab.research.google.com/drive/1rFv-VvHUBbzFYamz6nSMRJz1mEg6Ukqq#scrollTo=3umnTd-MfI0o&line=1&uniqifier=1), we provided the `name` as `text_convo`. Now, when we setup our ontology, we must ensure that the name of my bounding box tool is also `checklist_convo`. The same alignment must hold true for the other tools and classifications we create in our ontology."
301302
],
@@ -322,19 +323,19 @@
322323
" Classification( # Text classification given the name \"text\"\n",
323324
" class_type=Classification.Type.TEXT,\n",
324325
" scope=Classification.Scope.INDEX, \n",
325-
" name=\"text_convo\"), \n",
326+
" instructions=\"text_convo\"), \n",
326327
" Classification( # Checklist classification given the name \"text\" with two options: \"first_checklist_answer\" and \"second_checklist_answer\"\n",
327328
" class_type=Classification.Type.CHECKLIST, \n",
328329
" scope=Classification.Scope.INDEX, \n",
329-
" name=\"checklist_convo\", \n",
330+
" instructions=\"checklist_convo\", \n",
330331
" options=[\n",
331332
" Option(value=\"first_checklist_answer\"),\n",
332333
" Option(value=\"second_checklist_answer\") \n",
333334
" ]\n",
334335
" ), \n",
335336
" Classification( # Radio classification given the name \"text\" with two options: \"first_radio_answer\" and \"second_radio_answer\"\n",
336337
" class_type=Classification.Type.RADIO, \n",
337-
" name=\"radio_convo\", \n",
338+
" instructions=\"radio_convo\", \n",
338339
" scope=Classification.Scope.INDEX, \n",
339340
" options=[\n",
340341
" Option(value=\"first_radio_answer\"),\n",

examples/annotation_import/image.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@
587587
"cell_type": "markdown",
588588
"source": [
589589
"## Step 2: Create/select an Ontology\n",
590-
"Your project should have the correct ontology setup with all the tools and classifications supported for your annotations, and the tool and classification names should match the `name` field in your annotations to ensure the correct feature schemas are matched.\n",
590+
"Your project should have the correct ontology setup with all the tools and classifications supported for your annotations, and the tool names and classification instructions should match the `name`/`instructions` fields in your annotations to ensure the correct feature schemas are matched.\n",
591591
"\n",
592592
"For example, when we create the bounding box annotation above, we provided the `name` as `polyline`. Now, when we setup our ontology, we must ensure that the name of my bounding box tool is also `polyline`. The same alignment must hold true for the other tools and classifications we create in our ontology.\n",
593593
"\n",
@@ -606,33 +606,33 @@
606606
" classifications=[ # List of Classification objects\n",
607607
" Classification( # Radio classification given the name \"text\" with two options: \"first_radio_answer\" and \"second_radio_answer\"\n",
608608
" class_type=Classification.Type.RADIO, \n",
609-
" name=\"radio_question\", \n",
609+
" instructions=\"radio_question\", \n",
610610
" options=[\n",
611611
" Option(value=\"first_radio_answer\"),\n",
612612
" Option(value=\"second_radio_answer\")\n",
613613
" ]\n",
614614
" ),\n",
615615
" Classification( # Checklist classification given the name \"text\" with two options: \"first_checklist_answer\" and \"second_checklist_answer\"\n",
616616
" class_type=Classification.Type.CHECKLIST, \n",
617-
" name=\"checklist_question\", \n",
617+
" instructions=\"checklist_question\", \n",
618618
" options=[\n",
619619
" Option(value=\"first_checklist_answer\"),\n",
620620
" Option(value=\"second_checklist_answer\") \n",
621621
" ]\n",
622622
" ), \n",
623623
" Classification( # Text classification given the name \"text\"\n",
624624
" class_type=Classification.Type.TEXT,\n",
625-
" name=\"free_text\"\n",
625+
" instructions=\"free_text\"\n",
626626
" ),\n",
627627
" Classification(\n",
628628
" class_type=Classification.Type.RADIO, \n",
629-
" name=\"nested_radio_question\",\n",
629+
" instructions=\"nested_radio_question\",\n",
630630
" options=[\n",
631631
" Option(\"first_radio_answer\",\n",
632632
" options=[\n",
633633
" Classification(\n",
634634
" class_type=Classification.Type.RADIO,\n",
635-
" name=\"sub_radio_question\",\n",
635+
" instructions=\"sub_radio_question\",\n",
636636
" options=[Option(\"first_sub_radio_answer\")]\n",
637637
" )\n",
638638
" ]\n",
@@ -651,7 +651,7 @@
651651
" classifications=[\n",
652652
" Classification(\n",
653653
" class_type=Classification.Type.RADIO,\n",
654-
" name=\"sub_radio_question\",\n",
654+
" instructions=\"sub_radio_question\",\n",
655655
" options=[\n",
656656
" Option(value=\"first_sub_radio_answer\")\n",
657657
" ]\n",

examples/annotation_import/text.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@
366366
"cell_type": "markdown",
367367
"source": [
368368
"### Step 2: Create/select an ontology\n",
369-
"Your project should have the correct ontology setup with all the tools and classifications supported for your annotations, and the tool and classification names should match the `name` field in your annotations to ensure the correct feature schemas are matched.\n",
369+
"Your project should have the correct ontology setup with all the tools and classifications supported for your annotations, and the tool names and classification instructions should match the `name`/`instructions` fields in your annotations to ensure the correct feature schemas are matched.\n",
370370
"\n",
371371
"For example, when we create the checklist annotation above, we provided the `name` as `checklist_question`. Now, when we setup our ontology, we must ensure that the name of my classification tool is also `checklist_question`. The same alignment must hold true for the other tools and classifications we create in our ontology.\n",
372372
"\n",
@@ -386,18 +386,18 @@
386386
" classifications=[ # List of Classification objects\n",
387387
" Classification( \n",
388388
" class_type=Classification.Type.RADIO, \n",
389-
" name=\"radio_question\", \n",
389+
" instructions=\"radio_question\", \n",
390390
" options=[Option(value=\"first_radio_answer\")]\n",
391391
" ),\n",
392392
" Classification( \n",
393393
" class_type=Classification.Type.RADIO, \n",
394-
" name=\"radio_question_sub\", \n",
394+
" instructions=\"radio_question_sub\", \n",
395395
" options=[\n",
396396
" Option(value=\"first_radio_answer\",\n",
397397
" options=[\n",
398398
" Classification(\n",
399399
" class_type=Classification.Type.RADIO,\n",
400-
" name=\"sub_radio_question\",\n",
400+
" instructions=\"sub_radio_question\",\n",
401401
" options=[\n",
402402
" Option(value=\"first_sub_radio_answer\")\n",
403403
" ]\n",
@@ -408,7 +408,7 @@
408408
" ),\n",
409409
" Classification( \n",
410410
" class_type=Classification.Type.CHECKLIST, \n",
411-
" name=\"checklist_question\", \n",
411+
" instructions=\"checklist_question\", \n",
412412
" options=[\n",
413413
" Option(value=\"first_checklist_answer\"),\n",
414414
" Option(value=\"second_checklist_answer\"), \n",
@@ -417,7 +417,7 @@
417417
" ), \n",
418418
" Classification( # Text classification given the name \"text\"\n",
419419
" class_type=Classification.Type.TEXT,\n",
420-
" name=\"free_text\"\n",
420+
" instructions=\"free_text\"\n",
421421
" )\n",
422422
" ],\n",
423423
" tools=[ # List of Tool objects\n",

examples/annotation_import/tiled.ipynb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -616,13 +616,14 @@
616616
},
617617
{
618618
"cell_type": "markdown",
619+
"source": [
620+
"### Step 2: Create/select an ontology\n",
621+
"Your project should have the correct ontology setup with all the tools and classifications supported for your annotations, and the tool names and classification instructions should match the `name`/`instructions` fields in your annotations to ensure the correct feature schemas are matched."
622+
],
619623
"metadata": {
620624
"id": "y_tWMvxilTq9"
621625
},
622-
"source": [
623-
"### Step 2: Create/select an ontology\n",
624-
"Your project should have the correct ontology setup with all the tools and classifications supported for your annotations, and the tool and classification names should match the `name` field in your annotations to ensure the correct feature schemas are matched."
625-
]
626+
"id": "y_tWMvxilTq9"
626627
},
627628
{
628629
"cell_type": "code",
@@ -646,7 +647,7 @@
646647
" classifications=[\n",
647648
" Classification(\n",
648649
" class_type=Classification.Type.CHECKLIST,\n",
649-
" name=\"checklist_class_name\",\n",
650+
" instructions=\"checklist_class_name\",\n",
650651
" options=[\n",
651652
" Option(value=\"first_checklist_answer\")\n",
652653
" ]\n",
@@ -659,15 +660,15 @@
659660
" classifications=[\n",
660661
" Classification(\n",
661662
" class_type=Classification.Type.TEXT,\n",
662-
" name=\"free_text_geo\"\n",
663+
" instructions=\"free_text_geo\"\n",
663664
" ),\n",
664665
" ]\n",
665666
" ) \n",
666667
" ],\n",
667668
" classifications = [\n",
668669
" Classification(\n",
669670
" class_type=Classification.Type.CHECKLIST, \n",
670-
" name=\"checklist_question_geo\",\n",
671+
" instructions=\"checklist_question_geo\",\n",
671672
" options=[\n",
672673
" Option(value=\"first_checklist_answer\"),\n",
673674
" Option(value=\"second_checklist_answer\"), \n",
@@ -676,7 +677,7 @@
676677
" ), \n",
677678
" Classification(\n",
678679
" class_type=Classification.Type.RADIO, \n",
679-
" name=\"radio_question_geo\",\n",
680+
" instructions=\"radio_question_geo\",\n",
680681
" options=[\n",
681682
" Option(value=\"first_radio_answer\")\n",
682683
" ]\n",

examples/annotation_import/video.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@
504504
},
505505
"source": [
506506
"### Step 2: Create/select an ontology\n",
507-
"Your project should have the correct ontology setup with all the tools and classifications supported for your annotations, and the tool and classification names should match the `name` field in your annotations to ensure the correct feature schemas are matched.\n",
507+
"Your project should have the correct ontology setup with all the tools and classifications supported for your annotations, and the tool names and classification instructions should match the `name`/`instructions` fields in your annotations to ensure the correct feature schemas are matched.\n",
508508
"\n",
509509
"For example, when we create the bounding box annotation above, we provided the `name` as `bbox_video`. Now, when we setup our ontology, we must ensure that the name of my bounding box tool is also `bbox_video`. The same alignment must hold true for the other tools and classifications we create in our ontology.\n",
510510
"\n",
@@ -531,7 +531,7 @@
531531
" classifications=[\n",
532532
" Classification(\n",
533533
" class_type=Classification.Type.RADIO, \n",
534-
" name=\"bbox_radio\", \n",
534+
" instructions=\"bbox_radio\", \n",
535535
" scope = Classification.Scope.INDEX,\n",
536536
" options=[\n",
537537
" Option(value=\"bbox_radio_answer_1\"),\n",
@@ -545,7 +545,7 @@
545545
" classifications=[ \n",
546546
" Classification(\n",
547547
" class_type=Classification.Type.CHECKLIST, \n",
548-
" name=\"checklist_class\",\n",
548+
" instructions=\"checklist_class\",\n",
549549
" scope = Classification.Scope.INDEX, ## Need to defined scope for frame classifications \n",
550550
" options=[ \n",
551551
" Option(value=\"first_checklist_answer\"),\n",
@@ -554,21 +554,21 @@
554554
" ),\n",
555555
" Classification(\n",
556556
" class_type=Classification.Type.RADIO, \n",
557-
" name=\"radio_class_global\",\n",
557+
" instructions=\"radio_class_global\",\n",
558558
" options=[ \n",
559559
" Option(value=\"first_radio_answer\"),\n",
560560
" Option(value=\"second_radio_answer\")\n",
561561
" ]\n",
562562
" ),\n",
563563
" Classification(\n",
564564
" class_type=Classification.Type.RADIO, \n",
565-
" name=\"radio_question_nested\",\n",
565+
" instructions=\"radio_question_nested\",\n",
566566
" options=[\n",
567567
" Option(\"first_radio_question\",\n",
568568
" options=[\n",
569569
" Classification(\n",
570570
" class_type=Classification.Type.RADIO,\n",
571-
" name=\"sub_question_radio\",\n",
571+
" instructions=\"sub_question_radio\",\n",
572572
" options=[Option(\"sub_answer\")]\n",
573573
" )\n",
574574
" ]\n",

examples/annotation_types/basics.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,15 +1168,15 @@
11681168
" name=\"deer_nose\",\n",
11691169
" classifications=[\n",
11701170
" Classification(class_type=Classification.Type.RADIO,\n",
1171-
" name=\"description\",\n",
1171+
" instructions=\"description\",\n",
11721172
" options=[Option(value=\"wet\")])\n",
11731173
" ]),\n",
11741174
" Tool(tool=Tool.Type.SEGMENTATION, name=\"deer_eyes\")\n",
11751175
"],\n",
11761176
" classifications=[\n",
11771177
" Classification(\n",
11781178
" Classification.Type.CHECKLIST,\n",
1179-
" name=\"image_description\",\n",
1179+
" instructions=\"image_description\",\n",
11801180
" options=[\n",
11811181
" Option(value=\"bright\"),\n",
11821182
" Option(value=\"not_blurry\"),\n",

examples/annotation_types/label_containers.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,15 @@
207207
" name=\"deer_nose\",\n",
208208
" classifications=[\n",
209209
" Classification(class_type=Classification.Type.RADIO,\n",
210-
" name=\"nose_description\",\n",
210+
" instructions=\"nose_description\",\n",
211211
" options=[Option(value=\"wet\")])\n",
212212
" ]),\n",
213213
" Tool(tool=Tool.Type.SEGMENTATION, name=\"deer_eyes\")\n",
214214
" ],\n",
215215
" classifications=[\n",
216216
" Classification(\n",
217217
" Classification.Type.CHECKLIST,\n",
218-
" name=\"image_description\",\n",
218+
" instructions=\"image_description\",\n",
219219
" options=[\n",
220220
" Option(value=\"bright\"),\n",
221221
" Option(value=\"not_blurry\"),\n",

examples/basics/ontologies.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,13 @@
355355
"execution_count": 13,
356356
"source": [
357357
"text_classification = Classification(class_type=Classification.Type.TEXT,\n",
358-
" name=\"dog_name\")\n",
358+
" instructions=\"dog_name\")\n",
359359
"radio_classification = Classification(class_type=Classification.Type.RADIO,\n",
360-
" name=\"dog_breed\",\n",
360+
" instructions=\"dog_breed\",\n",
361361
" options=[Option(\"poodle\")])\n",
362362
"checklist_classification = Classification(\n",
363363
" class_type=Classification.Type.CHECKLIST,\n",
364-
" name=\"background\",\n",
364+
" instructions=\"background\",\n",
365365
" options=[Option(\"at_park\"), Option(\"has_leash\")])"
366366
],
367367
"outputs": [],

examples/integrations/databricks/labelbox_databricks_example.ipynb

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

examples/integrations/databricks/labelbox_databricks_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201

202202
weather_classification = Classification(
203203
class_type=Classification.Type.RADIO,
204-
name="what is the weather?",
204+
instructions="what is the weather?",
205205
options=[Option(value=c) for c in conditions])
206206
ontology.add_classification(weather_classification)
207207

0 commit comments

Comments
 (0)