Skip to content

Commit 494ab5b

Browse files
authored
Merge pull request #175 from Labelbox/mea-dev
release 2.6b0
2 parents 8ea33bd + cd3b754 commit 494ab5b

File tree

20 files changed

+367
-82
lines changed

20 files changed

+367
-82
lines changed

CHANGELOG.md

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

3+
4+
# Version 2.6b0+mea (2021-06-16)
5+
## Added
6+
* `ModelRun.annotation_groups()` to fetch data rows and label information for a model run
7+
8+
9+
# Version 2.6.0 (2021-06-11)
10+
## Fix
11+
* Upated `create_mask_ndjson` helper function in `image_mal.ipynb` to use the color arg
12+
instead of a hardcoded color.
13+
14+
## Added
15+
* asset_metadata is now deprecated and has been replaced with asset_attachments
16+
* `AssetAttachment` replaces `AssetMetadata` ( see definition for updated attribute names )
17+
* Use `DataRow.attachments()` instead of `DataRow.metadata()`
18+
* Use `DataRow.create_attachment()` instead of `DataRow.create_metadata()`
19+
* Update pydantic version
20+
321
# Version 2.5b0+mea (2021-06-11)
422
## Added
523
* Added new `Model` and 'ModelRun` entities
@@ -8,6 +26,7 @@
826
* Added notebook to demonstrate how to use MEA
927
* Added `datarow_miou` for calculating datarow level iou scores
1028

29+
1130
# Version 2.5.6 (2021-05-19)
1231
## Fix
1332
* MAL validation no longer raises exception when NER tool has same start and end location

examples/basics/data_rows.ipynb

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
{
2626
"cell_type": "code",
27-
"execution_count": 1,
27+
"execution_count": null,
2828
"id": "posted-nation",
2929
"metadata": {},
3030
"outputs": [],
@@ -34,7 +34,7 @@
3434
},
3535
{
3636
"cell_type": "code",
37-
"execution_count": 2,
37+
"execution_count": 1,
3838
"id": "beautiful-ready",
3939
"metadata": {},
4040
"outputs": [],
@@ -47,7 +47,7 @@
4747
},
4848
{
4949
"cell_type": "code",
50-
"execution_count": 3,
50+
"execution_count": 2,
5151
"id": "vertical-stockholm",
5252
"metadata": {},
5353
"outputs": [],
@@ -78,21 +78,21 @@
7878
},
7979
{
8080
"cell_type": "code",
81-
"execution_count": 4,
81+
"execution_count": 3,
8282
"id": "rural-fellow",
8383
"metadata": {},
8484
"outputs": [],
8585
"source": [
8686
"# Pick a project that has a dataset attached, data has external ids, and there are some labels\n",
8787
"# This will modify the project so just pick a dummy one that you don't care about\n",
88-
"PROJECT_ID = \"ckk4q1viuc0w20704eh69u28h\"\n",
88+
"PROJECT_ID = \"ckpnfquwy0kyg0y8t9rwb99cz\"\n",
8989
"# Only update this if you have an on-prem deployment\n",
9090
"ENDPOINT = \"https://api.labelbox.com/graphql\""
9191
]
9292
},
9393
{
9494
"cell_type": "code",
95-
"execution_count": 5,
95+
"execution_count": 4,
9696
"id": "proof-detective",
9797
"metadata": {},
9898
"outputs": [],
@@ -102,7 +102,7 @@
102102
},
103103
{
104104
"cell_type": "code",
105-
"execution_count": 6,
105+
"execution_count": 5,
106106
"id": "selective-reconstruction",
107107
"metadata": {},
108108
"outputs": [],
@@ -123,7 +123,7 @@
123123
},
124124
{
125125
"cell_type": "code",
126-
"execution_count": 7,
126+
"execution_count": 6,
127127
"id": "extra-paris",
128128
"metadata": {},
129129
"outputs": [],
@@ -134,17 +134,17 @@
134134
},
135135
{
136136
"cell_type": "code",
137-
"execution_count": 8,
137+
"execution_count": 7,
138138
"id": "packed-going",
139139
"metadata": {},
140140
"outputs": [
141141
{
142142
"name": "stdout",
143143
"output_type": "stream",
144144
"text": [
145-
"Associated dataset <Dataset {'created_at': datetime.datetime(2021, 3, 28, 23, 35, 34, tzinfo=datetime.timezone.utc), 'description': '', 'name': 'image_mal_dataset', 'uid': 'ckmtsvzps21f80y6205t304se', 'updated_at': datetime.datetime(2021, 3, 28, 23, 35, 34, tzinfo=datetime.timezone.utc)}>\n",
146-
"Associated label(s) <Label {'agreement': None, 'benchmark_agreement': None, 'created_at': datetime.datetime(2021, 3, 29, 17, 53, 36, tzinfo=datetime.timezone.utc), 'is_benchmark_reference': False, 'label': '{\"objects\":[{\"featureId\":\"ckmuw40nm00013g68kfua4i88\",\"schemaId\":\"ckk4q1vo80nhv0y92b7vgctgt\",\"title\":\"Frog\",\"value\":\"frog\",\"color\":\"#00D4FF\",\"bbox\":{\"top\":815,\"left\":847,\"height\":247,\"width\":512},\"instanceURI\":\"https://api.labelbox.com/masks/feature/ckmuw40nm00013g68kfua4i88\"}],\"classifications\":[]}', 'seconds_to_label': 0, 'uid': 'ckmuw42qy00033g68zdhpove7', 'updated_at': datetime.datetime(2021, 3, 29, 17, 54, 32, tzinfo=datetime.timezone.utc)}>\n",
147-
"External id dbb168f6-4f2c-46e0-a22a-abc837fda3f1\n"
145+
"Associated dataset <Dataset {'created_at': datetime.datetime(2021, 6, 8, 2, 40, 10, tzinfo=datetime.timezone.utc), 'description': '', 'name': 'image_mea_dataset', 'uid': 'ckpnfqv6g1rvb0ybt85hjephs', 'updated_at': datetime.datetime(2021, 6, 8, 2, 40, 10, tzinfo=datetime.timezone.utc)}>\n",
146+
"Associated label(s) <Label {'agreement': None, 'benchmark_agreement': None, 'created_at': datetime.datetime(2021, 6, 8, 2, 42, 11, tzinfo=datetime.timezone.utc), 'is_benchmark_reference': False, 'label': '{\"objects\":[{\"featureId\":\"ckpnftdgo00013h693jxji4wa\",\"schemaId\":\"ckpnfqw600kyt0y8tgwsb01xg\",\"title\":\"person\",\"value\":\"person\",\"color\":\"#ff0000\",\"bbox\":{\"top\":1044,\"left\":1460,\"height\":265,\"width\":118},\"instanceURI\":\"https://api.labelbox.com/masks/feature/ckpnftdgo00013h693jxji4wa\"},{\"featureId\":\"ckpo2bsq800013h69mi1w6xz1\",\"schemaId\":\"ckpnfqw610kyx0y8t4hotc6ld\",\"title\":\"car\",\"value\":\"car\",\"color\":\"#00ffff\",\"instanceURI\":\"https://api.labelbox.com/masks/feature/ckpo2bsq800013h69mi1w6xz1\"}],\"classifications\":[]}', 'seconds_to_label': 101.633, 'uid': 'ckpnftgpx00033h69z83erv92', 'updated_at': datetime.datetime(2021, 6, 9, 0, 51, 34, tzinfo=datetime.timezone.utc)}>\n",
147+
"External id 3b983504-bfbd-4c26-8719-8ef2d5a2c14f\n"
148148
]
149149
}
150150
],
@@ -157,15 +157,15 @@
157157
},
158158
{
159159
"cell_type": "code",
160-
"execution_count": 9,
160+
"execution_count": 8,
161161
"id": "above-vocabulary",
162162
"metadata": {},
163163
"outputs": [
164164
{
165165
"name": "stdout",
166166
"output_type": "stream",
167167
"text": [
168-
"<DataRow {'created_at': datetime.datetime(2021, 3, 28, 23, 35, 35, tzinfo=datetime.timezone.utc), 'external_id': 'dbb168f6-4f2c-46e0-a22a-abc837fda3f1', 'row_data': 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Kitano_Street_Kobe01s5s4110.jpg/2560px-Kitano_Street_Kobe01s5s4110.jpg', 'uid': 'ckmtsvzx421fb0y62bbsmbavz', 'updated_at': datetime.datetime(2021, 3, 29, 17, 54, 56, tzinfo=datetime.timezone.utc)}>\n"
168+
"<DataRow {'created_at': datetime.datetime(2021, 6, 8, 2, 40, 10, tzinfo=datetime.timezone.utc), 'external_id': '3b983504-bfbd-4c26-8719-8ef2d5a2c14f', 'media_attributes': {'width': 2560, 'height': 1707, 'mimeType': 'image/jpeg'}, 'row_data': 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Kitano_Street_Kobe01s5s4110.jpg/2560px-Kitano_Street_Kobe01s5s4110.jpg', 'uid': 'ckpnfqvcb0t2o0yane73d3whi', 'updated_at': datetime.datetime(2021, 6, 9, 0, 51, tzinfo=datetime.timezone.utc)}>\n"
169169
]
170170
}
171171
],
@@ -185,17 +185,17 @@
185185
},
186186
{
187187
"cell_type": "code",
188-
"execution_count": 10,
188+
"execution_count": 9,
189189
"id": "medical-portuguese",
190190
"metadata": {},
191191
"outputs": [
192192
{
193193
"data": {
194194
"text/plain": [
195-
"<DataRow ID: ckmuw60q700ur0y8wcu178hbi>"
195+
"<DataRow ID: ckporcoee1c7s0z7fha6l5x0d>"
196196
]
197197
},
198-
"execution_count": 14,
198+
"execution_count": 9,
199199
"metadata": {},
200200
"output_type": "execute_result"
201201
}
@@ -213,7 +213,7 @@
213213
},
214214
{
215215
"cell_type": "code",
216-
"execution_count": 11,
216+
"execution_count": 10,
217217
"id": "round-perfume",
218218
"metadata": {},
219219
"outputs": [],
@@ -228,7 +228,7 @@
228228
},
229229
{
230230
"cell_type": "code",
231-
"execution_count": 12,
231+
"execution_count": 11,
232232
"id": "breeding-brother",
233233
"metadata": {},
234234
"outputs": [],
@@ -243,7 +243,7 @@
243243
},
244244
{
245245
"cell_type": "code",
246-
"execution_count": 13,
246+
"execution_count": 12,
247247
"id": "thrown-designation",
248248
"metadata": {},
249249
"outputs": [],
@@ -256,7 +256,7 @@
256256
},
257257
{
258258
"cell_type": "code",
259-
"execution_count": 14,
259+
"execution_count": 13,
260260
"id": "japanese-jefferson",
261261
"metadata": {},
262262
"outputs": [],
@@ -272,7 +272,7 @@
272272
},
273273
{
274274
"cell_type": "code",
275-
"execution_count": 15,
275+
"execution_count": 14,
276276
"id": "accessible-effort",
277277
"metadata": {},
278278
"outputs": [
@@ -304,15 +304,15 @@
304304
},
305305
{
306306
"cell_type": "code",
307-
"execution_count": 16,
307+
"execution_count": 15,
308308
"id": "floral-elimination",
309309
"metadata": {},
310310
"outputs": [
311311
{
312312
"name": "stdout",
313313
"output_type": "stream",
314314
"text": [
315-
"18201a8d-34a5-41ea-8ea0-feede9776b4a 18201a8d-34a5-41ea-8ea0-feede9776b4a\n"
315+
"337e90de-c13c-48be-a87d-94d331b5e9a7 337e90de-c13c-48be-a87d-94d331b5e9a7\n"
316316
]
317317
}
318318
],
@@ -325,28 +325,28 @@
325325
},
326326
{
327327
"cell_type": "code",
328-
"execution_count": 17,
328+
"execution_count": 16,
329329
"id": "collect-cosmetic",
330330
"metadata": {},
331331
"outputs": [
332332
{
333333
"data": {
334334
"text/plain": [
335-
"<AssetMetadata ID: ckmuw6mme5mpr0y839dzheh7c>"
335+
"<AssetAttachment ID: ckporcvj61dni0y632e6cb217>"
336336
]
337337
},
338-
"execution_count": 21,
338+
"execution_count": 16,
339339
"metadata": {},
340340
"output_type": "execute_result"
341341
}
342342
],
343343
"source": [
344344
"# We can also create attachments\n",
345345
"# Attachments are visible for all projects connected to the data_row \n",
346-
"data_row.create_metadata(meta_type=\"TEXT\", meta_value=\"LABELERS WILL SEE THIS \")\n",
346+
"data_row.create_attachment(attachment_type=\"TEXT\", attachment_value=\"LABELERS WILL SEE THIS \")\n",
347347
"# See more information here:\n",
348348
"# https://docs.labelbox.com/data-model/en/index-en#attachments\n",
349-
"# Note that meta_value must always be a string (url to a video/image or a text value to display)"
349+
"# Note that attachment_value must always be a string (url to a video/image or a text value to display)"
350350
]
351351
},
352352
{
@@ -359,7 +359,7 @@
359359
},
360360
{
361361
"cell_type": "code",
362-
"execution_count": 18,
362+
"execution_count": 17,
363363
"id": "dental-banana",
364364
"metadata": {},
365365
"outputs": [],
@@ -370,7 +370,7 @@
370370
},
371371
{
372372
"cell_type": "code",
373-
"execution_count": 19,
373+
"execution_count": 18,
374374
"id": "binary-organic",
375375
"metadata": {},
376376
"outputs": [],

examples/model_assisted_labeling/image_mal.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@
346346
" },\n",
347347
" \"mask\": {\n",
348348
" \"instanceURI\": url,\n",
349-
" \"colorRGB\": [255, 0, 0]\n",
349+
" \"colorRGB\": color\n",
350350
" }\n",
351351
" }\n",
352352
" return result\n",
@@ -553,4 +553,4 @@
553553
},
554554
"nbformat": 4,
555555
"nbformat_minor": 5
556-
}
556+
}

0 commit comments

Comments
 (0)