Skip to content

Commit d7f5d56

Browse files
author
Matt Sokoloff
committed
Merge branch 'develop' of https://github.com/Labelbox/labelbox-python into ms/exports-v2-update
2 parents 28f099e + a7e8005 commit d7f5d56

37 files changed

+343
-167
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
## Added
55
* All imports are available via `import labelbox as lb` and `import labelbox.types as lb_types`.
66
* Attachment_name support to create_attachment()
7+
* New method `Project.task_queues()` to obtain the task queues for a project.
8+
* New method `Project.move_data_rows_to_task_queue()` for moving data rows to a specified task queue.
79

810
## Changed
911
* `LabelImport.create_from_objects()`, `MALPredictionImport.create_from_objects()`, `MEAPredictionImport.create_from_objects()`, `Project.upload_annotations()`, `ModelRun.add_predictions()` now support Python Types for annotations.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pip3 install -r requirements.txt
5454
To install dependencies required for data processing modules use:
5555

5656
```
57-
pip install labelbox[data]
57+
pip install "labelbox[data]"
5858
```
5959

6060
## Documentation

docs/source/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ Task
118118
:members:
119119
:show-inheritance:
120120

121+
Task Queue
122+
---------------------------
123+
.. automodule:: labelbox.schema.task_queue
124+
:members:
125+
:show-inheritance:
126+
121127
User
122128
---------------------------
123129

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: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@
8484
"metadata": {},
8585
"source": [
8686
"import labelbox as lb\n",
87-
"import labelbox.data.annotation_types as lb_types\n",
88-
"import labelbox.data.serialization as lb_serializers\n",
87+
"import labelbox.types as lb_types\n",
8988
"import uuid\n",
9089
"import numpy as np\n"
9190
],
@@ -773,7 +772,6 @@
773772
"\n",
774773
" ]:\n",
775774
" annotation.update({\n",
776-
" 'uuid': str(uuid.uuid4()),\n",
777775
" 'dataRow': {'id': data_row.uid},\n",
778776
" })\n",
779777
" 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/basics/getting_started.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243
"metadata": {},
244244
"source": [
245245
"queued_data_rows = project.export_queued_data_rows()\n",
246-
"ground_truth_list = lb_types.LabelList()\n",
246+
"ground_truth_list = list()\n",
247247
"\n",
248248
"for datarow in queued_data_rows:\n",
249249
" annotations_list = []\n",

0 commit comments

Comments
 (0)