Skip to content

Commit e31866f

Browse files
committed
[AL-4764] Rename Classification.instructions to Classification.name
1 parent e012529 commit e31866f

File tree

24 files changed

+145
-132
lines changed

24 files changed

+145
-132
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22

33
# Version 3.37.0 (2023-xx-xx)
4+
## Changed
5+
* Rename `Classification.instructions` to `Classification.name`
6+
47
## Fixed
58
* Retry connection timeouts
69

examples/annotation_import/conversational.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,7 @@
295295
"cell_type": "markdown",
296296
"source": [
297297
"## Step 2: Create/select an ontology\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",
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",
300299
"\n",
301300
"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."
302301
],
@@ -323,19 +322,19 @@
323322
" Classification( # Text classification given the name \"text\"\n",
324323
" class_type=Classification.Type.TEXT,\n",
325324
" scope=Classification.Scope.INDEX, \n",
326-
" instructions=\"text_convo\"), \n",
325+
" name=\"text_convo\"), \n",
327326
" Classification( # Checklist classification given the name \"text\" with two options: \"first_checklist_answer\" and \"second_checklist_answer\"\n",
328327
" class_type=Classification.Type.CHECKLIST, \n",
329328
" scope=Classification.Scope.INDEX, \n",
330-
" instructions=\"checklist_convo\", \n",
329+
" name=\"checklist_convo\", \n",
331330
" options=[\n",
332331
" Option(value=\"first_checklist_answer\"),\n",
333332
" Option(value=\"second_checklist_answer\") \n",
334333
" ]\n",
335334
" ), \n",
336335
" Classification( # Radio classification given the name \"text\" with two options: \"first_radio_answer\" and \"second_radio_answer\"\n",
337336
" class_type=Classification.Type.RADIO, \n",
338-
" instructions=\"radio_convo\", \n",
337+
" name=\"radio_convo\", \n",
339338
" scope=Classification.Scope.INDEX, \n",
340339
" options=[\n",
341340
" 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 names and classification instructions should match the `name`/`instructions` fields 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 and classification names should match the `name` field 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-
" instructions=\"radio_question\", \n",
609+
" name=\"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-
" instructions=\"checklist_question\", \n",
617+
" name=\"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-
" instructions=\"free_text\"\n",
625+
" name=\"free_text\"\n",
626626
" ),\n",
627627
" Classification(\n",
628628
" class_type=Classification.Type.RADIO, \n",
629-
" instructions=\"nested_radio_question\",\n",
629+
" name=\"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-
" instructions=\"sub_radio_question\",\n",
635+
" name=\"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-
" instructions=\"sub_radio_question\",\n",
654+
" name=\"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 names and classification instructions should match the `name`/`instructions` fields 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 and classification names should match the `name` field 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-
" instructions=\"radio_question\", \n",
389+
" name=\"radio_question\", \n",
390390
" options=[Option(value=\"first_radio_answer\")]\n",
391391
" ),\n",
392392
" Classification( \n",
393393
" class_type=Classification.Type.RADIO, \n",
394-
" instructions=\"radio_question_sub\", \n",
394+
" name=\"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-
" instructions=\"sub_radio_question\",\n",
400+
" name=\"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-
" instructions=\"checklist_question\", \n",
411+
" name=\"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-
" instructions=\"free_text\"\n",
420+
" name=\"free_text\"\n",
421421
" )\n",
422422
" ],\n",
423423
" tools=[ # List of Tool objects\n",

examples/annotation_import/tiled.ipynb

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -616,14 +616,13 @@
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-
],
623619
"metadata": {
624620
"id": "y_tWMvxilTq9"
625621
},
626-
"id": "y_tWMvxilTq9"
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+
]
627626
},
628627
{
629628
"cell_type": "code",
@@ -647,7 +646,7 @@
647646
" classifications=[\n",
648647
" Classification(\n",
649648
" class_type=Classification.Type.CHECKLIST,\n",
650-
" instructions=\"checklist_class_name\",\n",
649+
" name=\"checklist_class_name\",\n",
651650
" options=[\n",
652651
" Option(value=\"first_checklist_answer\")\n",
653652
" ]\n",
@@ -660,15 +659,15 @@
660659
" classifications=[\n",
661660
" Classification(\n",
662661
" class_type=Classification.Type.TEXT,\n",
663-
" instructions=\"free_text_geo\"\n",
662+
" name=\"free_text_geo\"\n",
664663
" ),\n",
665664
" ]\n",
666665
" ) \n",
667666
" ],\n",
668667
" classifications = [\n",
669668
" Classification(\n",
670669
" class_type=Classification.Type.CHECKLIST, \n",
671-
" instructions=\"checklist_question_geo\",\n",
670+
" name=\"checklist_question_geo\",\n",
672671
" options=[\n",
673672
" Option(value=\"first_checklist_answer\"),\n",
674673
" Option(value=\"second_checklist_answer\"), \n",
@@ -677,7 +676,7 @@
677676
" ), \n",
678677
" Classification(\n",
679678
" class_type=Classification.Type.RADIO, \n",
680-
" instructions=\"radio_question_geo\",\n",
679+
" name=\"radio_question_geo\",\n",
681680
" options=[\n",
682681
" Option(value=\"first_radio_answer\")\n",
683682
" ]\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 names and classification instructions should match the `name`/`instructions` fields 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 and classification names should match the `name` field 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-
" instructions=\"bbox_radio\", \n",
534+
" name=\"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-
" instructions=\"checklist_class\",\n",
548+
" name=\"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-
" instructions=\"radio_class_global\",\n",
557+
" name=\"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-
" instructions=\"radio_question_nested\",\n",
565+
" name=\"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-
" instructions=\"sub_question_radio\",\n",
571+
" name=\"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-
" instructions=\"description\",\n",
1171+
" name=\"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-
" instructions=\"image_description\",\n",
1179+
" name=\"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-
" instructions=\"nose_description\",\n",
210+
" name=\"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-
" instructions=\"image_description\",\n",
218+
" name=\"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-
" instructions=\"dog_name\")\n",
358+
" name=\"dog_name\")\n",
359359
"radio_classification = Classification(class_type=Classification.Type.RADIO,\n",
360-
" instructions=\"dog_breed\",\n",
360+
" name=\"dog_breed\",\n",
361361
" options=[Option(\"poodle\")])\n",
362362
"checklist_classification = Classification(\n",
363363
" class_type=Classification.Type.CHECKLIST,\n",
364-
" instructions=\"background\",\n",
364+
" name=\"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.

0 commit comments

Comments
 (0)