Skip to content

Commit 9631e4e

Browse files
kkim-labelboxwhistlerKevin KimVal Brodskyvbrodsky
authored
Release 3.44.0 (v2) (#1072)
Co-authored-by: Ibrahim Muhammad <[email protected]> Co-authored-by: Kevin Kim <[email protected]> Co-authored-by: Val Brodsky <[email protected]> Co-authored-by: Val Brodsky <[email protected]> Co-authored-by: Klaus Opreschko <[email protected]> Co-authored-by: Klaus Opreschko <[email protected]> Co-authored-by: mnoszczak <[email protected]> Co-authored-by: Andrea Ovalle <[email protected]> Co-authored-by: Dmitriy <[email protected]> Co-authored-by: Dmitriy Apollonin <[email protected]> Co-authored-by: Zeke <[email protected]> Co-authored-by: Richard Sun <[email protected]> Co-authored-by: Yamini Kancharana <[email protected]> Co-authored-by: Jovan Chohan <[email protected]>
1 parent 5b71ae1 commit 9631e4e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3304
-1585
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
repos:
22
- repo: https://github.com/google/yapf
3-
rev: v0.31.0
3+
rev: v0.33.0
44
hooks:
55
- id: yapf
66
name: "yapf"
77
args: [-i, --style, google]
8-
- repo: https://github.com/datarootsio/databooks
9-
rev: 1.0.1
10-
hooks:
11-
- id: databooks-meta
12-
args: [examples, --overwrite]
8+
- repo: https://github.com/datarootsio/databooks
9+
rev: 1.0.1
10+
hooks:
11+
- id: databooks-meta
12+
args: [examples, --overwrite]

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
# Version 3.44.0 (2023-04-26)
4+
5+
## Added
6+
* `predictions` param for optionally exporting predictions in model run export v2
7+
* Limits on `model_run_ids` and `project_ids` on catalog export v2 params
8+
* `WORKFLOW_ACTION` webhook topic
9+
* Added `data_row_ids` filter for dataset and project export v2
10+
11+
## Fixed
12+
* ISO timestamp parsing for datetime metadata
13+
* Docstring typo for `client.delete_feature_schema_from_ontology()`
14+
15+
## Notebooks
16+
* Removed mention of embeddings metadata fields
17+
* Fixed broken colab link on `examples/extras/classification-confusion-matrix.ipynb`
18+
* Added free text classification example to video annotation import notebook
19+
* Updated prediction_upload notebooks with Annotation Type examples
20+
321
# Version 3.43.0 (2023-04-05)
422

523
## Added

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ RUN apt install -y libsm6 \
88
libfontconfig1 \
99
libxrender1 \
1010
libgl1-mesa-glx \
11-
libgeos-dev
11+
libgeos-dev \
12+
gcc
1213

1314
WORKDIR /usr/src/
1415
COPY requirements.txt /usr/src/

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
copyright = '2021, Labelbox'
2222
author = 'Labelbox'
2323

24-
release = '3.43.0'
24+
release = '3.44.0'
2525

2626
# -- General configuration ---------------------------------------------------
2727

examples/annotation_import/html.ipynb

Lines changed: 133 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,10 @@
7575
{
7676
"metadata": {},
7777
"source": [
78-
"!pip install -q 'labelbox[data]'"
78+
"!pip install -q \"labelbox[data]\""
7979
],
8080
"cell_type": "code",
81-
"outputs": [
82-
{
83-
"name": "stdout",
84-
"output_type": "stream",
85-
"text": [
86-
"\n",
87-
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip available: \u001b[0m\u001b[31;49m22.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.0.1\u001b[0m\n",
88-
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n"
89-
]
90-
}
91-
],
81+
"outputs": [],
9282
"execution_count": null
9383
},
9484
{
@@ -146,8 +136,8 @@
146136
")\n",
147137
"\n",
148138
"text_annotation_ndjson = {\n",
149-
" 'name': 'text_html',\n",
150-
" 'answer': 'sample text',\n",
139+
" \"name\": \"text_html\",\n",
140+
" \"answer\": \"sample text\",\n",
151141
"}"
152142
],
153143
"cell_type": "code",
@@ -160,7 +150,7 @@
160150
"##### Checklist Classification ####### \n",
161151
"\n",
162152
"checklist_annotation= lb_types.ClassificationAnnotation(\n",
163-
" name=\"checklist_html\", # must match your ontology feature's name\n",
153+
" name=\"checklist_html\", # must match your ontology feature\"s name\n",
164154
" value=lb_types.Checklist(\n",
165155
" answer = [\n",
166156
" lb_types.ClassificationAnswer(\n",
@@ -175,10 +165,10 @@
175165
"\n",
176166
"\n",
177167
"checklist_annotation_ndjson = {\n",
178-
" 'name': 'checklist_html',\n",
179-
" 'answers': [\n",
180-
" {'name': 'first_checklist_answer'},\n",
181-
" {'name': 'second_checklist_answer'}\n",
168+
" \"name\": \"checklist_html\",\n",
169+
" \"answers\": [\n",
170+
" {\"name\": \"first_checklist_answer\"},\n",
171+
" {\"name\": \"second_checklist_answer\"}\n",
182172
" ],\n",
183173
"}"
184174
],
@@ -197,16 +187,86 @@
197187
" name=\"second_radio_answer\")))\n",
198188
"\n",
199189
"radio_annotation_ndjson = {\n",
200-
" 'name': 'radio_html',\n",
201-
" 'answer': {\n",
202-
" 'name': 'first_radio_answer'\n",
190+
" \"name\": \"radio_html\",\n",
191+
" \"answer\": {\n",
192+
" \"name\": \"first_radio_answer\"\n",
203193
" },\n",
204194
"}"
205195
],
206196
"cell_type": "code",
207197
"outputs": [],
208198
"execution_count": null
209199
},
200+
{
201+
"metadata": {},
202+
"source": [
203+
"########## Classification - Radio and Checklist (with subclassifcations) ##########\n",
204+
"\n",
205+
"nested_radio_annotation = lb_types.ClassificationAnnotation(\n",
206+
" name=\"nested_radio_question\",\n",
207+
" value=lb_types.Radio(\n",
208+
" answer=lb_types.ClassificationAnswer(\n",
209+
" name=\"first_radio_answer\",\n",
210+
" classifications=[\n",
211+
" lb_types.ClassificationAnnotation(\n",
212+
" name=\"sub_radio_question\",\n",
213+
" value=lb_types.Radio(\n",
214+
" answer=lb_types.ClassificationAnswer(\n",
215+
" name=\"first_sub_radio_answer\")\n",
216+
" )\n",
217+
" )\n",
218+
" ]\n",
219+
" )\n",
220+
" )\n",
221+
")\n",
222+
"\n",
223+
"nested_radio_annotation_ndjson= {\n",
224+
" \"name\": \"nested_radio_question\",\n",
225+
" \"answer\": {\n",
226+
" \"name\": \"first_radio_answer\",\n",
227+
" \"classifications\": [{\n",
228+
" \"name\":\"sub_radio_question\",\n",
229+
" \"answer\": { \"name\" : \"first_sub_radio_answer\"}\n",
230+
" \n",
231+
" }]\n",
232+
" }\n",
233+
"}\n",
234+
"\n",
235+
"nested_checklist_annotation = lb_types.ClassificationAnnotation(\n",
236+
" name=\"nested_checklist_question\",\n",
237+
" value=lb_types.Checklist(\n",
238+
" answer=[lb_types.ClassificationAnswer(\n",
239+
" name=\"first_checklist_answer\",\n",
240+
" classifications=[\n",
241+
" lb_types.ClassificationAnnotation(\n",
242+
" name=\"sub_checklist_question\",\n",
243+
" value=lb_types.Checklist(\n",
244+
" answer=[lb_types.ClassificationAnswer(\n",
245+
" name=\"first_sub_checklist_answer\")]\n",
246+
" ))\n",
247+
" ]\n",
248+
" )]\n",
249+
" )\n",
250+
")\n",
251+
"\n",
252+
"nested_checklist_annotation_ndjson = {\n",
253+
" \"name\": \"nested_checklist_question\",\n",
254+
" \"answer\": [{\n",
255+
" \"name\": \"first_checklist_answer\", \n",
256+
" \"classifications\" : [\n",
257+
" {\n",
258+
" \"name\": \"sub_checklist_question\", \n",
259+
" \"answer\": {\"name\": \"first_sub_checklist_answer\"} \n",
260+
" \n",
261+
" } \n",
262+
" ] \n",
263+
" }]\n",
264+
"}"
265+
],
266+
"cell_type": "code",
267+
"outputs": [],
268+
"execution_count": null
269+
},
210270
{
211271
"metadata": {},
212272
"source": [
@@ -233,23 +293,17 @@
233293
" \"global_key\": global_key\n",
234294
"}\n",
235295
"\n",
236-
"dataset = client.create_dataset(name=\"html_annotation_import_demo_dataset\")\n",
296+
"dataset = client.create_dataset(\n",
297+
" name=\"html_annotation_import_demo_dataset\", \n",
298+
" iam_integration=None # Removing this argument will default to the organziation's default iam integration\n",
299+
") \n",
237300
"task = dataset.create_data_rows([asset])\n",
238301
"task.wait_till_done()\n",
239302
"print(\"Errors:\", task.errors)\n",
240303
"print(\"Failed data rows: \", task.failed_data_rows)"
241304
],
242305
"cell_type": "code",
243-
"outputs": [
244-
{
245-
"name": "stdout",
246-
"output_type": "stream",
247-
"text": [
248-
"Errors: None\n",
249-
"Failed data rows: None\n"
250-
]
251-
}
252-
],
306+
"outputs": [],
253307
"execution_count": null
254308
},
255309
{
@@ -286,6 +340,38 @@
286340
" lb.Option(value=\"first_radio_answer\"),\n",
287341
" lb.Option(value=\"second_radio_answer\")\n",
288342
" ]\n",
343+
" ),\n",
344+
" lb.Classification(\n",
345+
" class_type=lb.Classification.Type.CHECKLIST,\n",
346+
" name=\"nested_checklist_question\",\n",
347+
" options=[\n",
348+
" lb.Option(\"first_checklist_answer\",\n",
349+
" options=[\n",
350+
" lb.Classification(\n",
351+
" class_type=lb.Classification.Type.CHECKLIST,\n",
352+
" name=\"sub_checklist_question\", \n",
353+
" options=[lb.Option(\"first_sub_checklist_answer\")]\n",
354+
" )\n",
355+
" ]\n",
356+
" )\n",
357+
" ]\n",
358+
" ),\n",
359+
" lb.Classification(\n",
360+
" class_type=lb.Classification.Type.RADIO,\n",
361+
" name=\"nested_radio_question\", \n",
362+
" options=[\n",
363+
" lb.Option(value=\"first_radio_answer\",\n",
364+
" options=[\n",
365+
" lb.Classification(\n",
366+
" class_type=lb.Classification.Type.RADIO,\n",
367+
" name=\"sub_radio_question\",\n",
368+
" options=[\n",
369+
" lb.Option(value=\"first_sub_radio_answer\")\n",
370+
" ]\n",
371+
" ),\n",
372+
" ]\n",
373+
" )\n",
374+
" ],\n",
289375
" )\n",
290376
" ]\n",
291377
")\n",
@@ -309,22 +395,14 @@
309395
"metadata": {},
310396
"source": [
311397
"# Create Labelbox project\n",
312-
"project = client.create_project(name=\"html_project\", \n",
398+
"project = client.create_project(name=\"HTML Import Annotation Demo\", \n",
313399
" media_type=lb.MediaType.Html)\n",
314400
"\n",
315401
"# Setup your ontology \n",
316402
"project.setup_editor(ontology) # Connect your ontology and editor to your project"
317403
],
318404
"cell_type": "code",
319-
"outputs": [
320-
{
321-
"name": "stderr",
322-
"output_type": "stream",
323-
"text": [
324-
"Default createProject behavior will soon be adjusted to prefer batch projects. Pass in `queue_mode` parameter explicitly to opt-out for the time being.\n"
325-
]
326-
}
327-
],
405+
"outputs": [],
328406
"execution_count": null
329407
},
330408
{
@@ -349,22 +427,7 @@
349427
"print(\"Batch: \", batch)"
350428
],
351429
"cell_type": "code",
352-
"outputs": [
353-
{
354-
"name": "stdout",
355-
"output_type": "stream",
356-
"text": [
357-
"Batch: <Batch {\n",
358-
" \"consensus_settings_json\": \"{\\\"numberOfLabels\\\":1,\\\"coveragePercentage\\\":0}\",\n",
359-
" \"created_at\": \"2023-03-28 18:31:16+00:00\",\n",
360-
" \"name\": \"first-batch-html-demo\",\n",
361-
" \"size\": 0,\n",
362-
" \"uid\": \"b9c6dec0-cd96-11ed-a79b-bd72128661a2\",\n",
363-
" \"updated_at\": \"2023-03-28 18:31:16+00:00\"\n",
364-
"}>\n"
365-
]
366-
}
367-
],
430+
"outputs": [],
368431
"execution_count": null
369432
},
370433
{
@@ -397,7 +460,9 @@
397460
" annotations=[\n",
398461
" text_annotation,\n",
399462
" checklist_annotation,\n",
400-
" radio_annotation\n",
463+
" radio_annotation,\n",
464+
" nested_checklist_annotation,\n",
465+
" nested_radio_annotation\n",
401466
" ]\n",
402467
" )\n",
403468
")"
@@ -420,10 +485,13 @@
420485
"label_ndjson = []\n",
421486
"for annotations in [text_annotation_ndjson,\n",
422487
" checklist_annotation_ndjson,\n",
423-
" radio_annotation_ndjson]:\n",
488+
" radio_annotation_ndjson,\n",
489+
" nested_radio_annotation_ndjson,\n",
490+
" nested_checklist_annotation_ndjson\n",
491+
" ]:\n",
424492
" annotations.update({\n",
425-
" 'dataRow': {\n",
426-
" 'globalKey': global_key\n",
493+
" \"dataRow\": {\n",
494+
" \"globalKey\": global_key\n",
427495
" }\n",
428496
" })\n",
429497
" label_ndjson.append(annotations)"
@@ -462,16 +530,7 @@
462530
"print(\"Status of uploads: \", upload_job.statuses)"
463531
],
464532
"cell_type": "code",
465-
"outputs": [
466-
{
467-
"name": "stdout",
468-
"output_type": "stream",
469-
"text": [
470-
"Errors: []\n",
471-
"Status of uploads: [{'uuid': 'cd188c7e-167f-48ce-98e6-571f255ba319', 'dataRow': {'id': 'clfslgefk0um4079rfyajcf18', 'globalKey': 'sample_html_1.html'}, 'status': 'SUCCESS'}, {'uuid': '3153214d-831c-4aa4-bf95-280d657cfe51', 'dataRow': {'id': 'clfslgefk0um4079rfyajcf18', 'globalKey': 'sample_html_1.html'}, 'status': 'SUCCESS'}, {'uuid': '297a9f08-30b4-427f-b8f0-d1139709b97d', 'dataRow': {'id': 'clfslgefk0um4079rfyajcf18', 'globalKey': 'sample_html_1.html'}, 'status': 'SUCCESS'}]\n"
472-
]
473-
}
474-
],
533+
"outputs": [],
475534
"execution_count": null
476535
},
477536
{
@@ -496,16 +555,7 @@
496555
"print(\"Status of uploads: \", upload_job.statuses)"
497556
],
498557
"cell_type": "code",
499-
"outputs": [
500-
{
501-
"name": "stdout",
502-
"output_type": "stream",
503-
"text": [
504-
"Errors: []\n",
505-
"Status of uploads: [{'uuid': 'f1c3e6b6-1e7e-41ca-abd5-a0fd919082a6', 'dataRow': {'id': 'clfslgefk0um4079rfyajcf18', 'globalKey': 'sample_html_1.html'}, 'status': 'SUCCESS'}, {'uuid': '44714fd1-e8a8-4da4-aea9-b71392ac78a4', 'dataRow': {'id': 'clfslgefk0um4079rfyajcf18', 'globalKey': 'sample_html_1.html'}, 'status': 'SUCCESS'}, {'uuid': '9d520664-9565-46e7-8b0b-c0615158d004', 'dataRow': {'id': 'clfslgefk0um4079rfyajcf18', 'globalKey': 'sample_html_1.html'}, 'status': 'SUCCESS'}]\n"
506-
]
507-
}
508-
],
558+
"outputs": [],
509559
"execution_count": null
510560
},
511561
{

0 commit comments

Comments
 (0)