Skip to content

Commit f29a0e9

Browse files
committed
updates to mal notebooks to no longer mention assign feature schema ids
1 parent 0933c82 commit f29a0e9

File tree

3 files changed

+246
-536
lines changed

3 files changed

+246
-536
lines changed

examples/model_assisted_labeling/mal_basics.ipynb

Lines changed: 16 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@
140140
"id": "preliminary-benchmark",
141141
"outputId": "8cf16a44-d0b8-477f-b361-43865b2fc572"
142142
},
143-
144-
"outputs": [
143+
"outputs": [
145144
{
146145
"name": "stderr",
147146
"output_type": "stream",
@@ -295,7 +294,7 @@
295294
"We will create a Label called mal_label which has the same original structure as the label above\n",
296295
"\n",
297296
"Notes:\n",
298-
"* Each label requires a valid feature schema id. We will assign it using our built in `assign_feature_schema_ids` method\n",
297+
"* Each label requires a valid feature schema id or name\n",
299298
"* the NDJsonConverter takes in a list of labels"
300299
]
301300
},
@@ -307,30 +306,13 @@
307306
"id": "10b19393-920a-45c8-9660-42d8c449b9c2",
308307
"outputId": "a93a39de-c8ed-402c-b834-304b1ba8854a"
309308
},
310-
"outputs": [
311-
{
312-
"data": {
313-
"text/plain": [
314-
"[{'uuid': 'fde1945b-01df-43c2-807a-3f5fa20450f4',\n",
315-
" 'dataRow': {'id': 'ckzocppkf96r10z9q205151c3'},\n",
316-
" 'schemaId': 'ckzocpq4l9bw20z9s9bc70h29',\n",
317-
" 'classifications': [],\n",
318-
" 'bbox': {'top': 30.0, 'left': 30.0, 'height': 170.0, 'width': 170.0}}]"
319-
]
320-
},
321-
"execution_count": 6,
322-
"metadata": {},
323-
"output_type": "execute_result"
324-
}
325-
],
309+
"outputs": [],
326310
"source": [
327311
"mal_label = Label(\n",
328312
" data=image_data,\n",
329313
" annotations = [rectangle_annotation]\n",
330314
")\n",
331315
"\n",
332-
"mal_label.assign_feature_schema_ids(ontology_builder.from_project(mal_project))\n",
333-
"\n",
334316
"ndjson_labels = list(NDJsonConverter.serialize([mal_label]))\n",
335317
"\n",
336318
"ndjson_labels"
@@ -400,10 +382,7 @@
400382
"id": "41d103bc-a5fd-4f0b-95f0-7e9bc59fbd07"
401383
},
402384
"source": [
403-
"Label import is very similar to model-assisted labeling. We will need to re-assign the feature schema before continuing, \n",
404-
"but we can continue to use our NDJSonConverter\n",
405-
"\n",
406-
"We will create a Label called li_label which has the same original structure as the label above"
385+
"Label import is very similar to model-assisted labeling. We will create a Label called li_label which has the same original structure as the label above"
407386
]
408387
},
409388
{
@@ -414,30 +393,13 @@
414393
"id": "c95716d5-a1ee-46fe-8dca-313ce10f104f",
415394
"outputId": "0e83d5d0-1f51-4903-c777-f9c331781656"
416395
},
417-
"outputs": [
418-
{
419-
"data": {
420-
"text/plain": [
421-
"[{'uuid': '7be8bb0b-39a2-44a5-96ab-5def3752811b',\n",
422-
" 'dataRow': {'id': 'ckzocppkf96r10z9q205151c3'},\n",
423-
" 'schemaId': 'ckzocpqv80ukp0z9l67cc6liv',\n",
424-
" 'classifications': [],\n",
425-
" 'bbox': {'top': 30.0, 'left': 30.0, 'height': 170.0, 'width': 170.0}}]"
426-
]
427-
},
428-
"execution_count": 9,
429-
"metadata": {},
430-
"output_type": "execute_result"
431-
}
432-
],
396+
"outputs": [],
433397
"source": [
434398
"li_label = Label(\n",
435399
" data=image_data,\n",
436400
" annotations = [rectangle_annotation]\n",
437401
")\n",
438402
"\n",
439-
"li_label.assign_feature_schema_ids(ontology_builder.from_project(li_project))\n",
440-
"\n",
441403
"ndjson_labels = list(NDJsonConverter.serialize([li_label]))\n",
442404
"\n",
443405
"ndjson_labels"
@@ -489,8 +451,13 @@
489451
}
490452
],
491453
"metadata": {
454+
"colab": {
455+
"collapsed_sections": [],
456+
"name": "mal_basics.ipynb",
457+
"provenance": []
458+
},
492459
"kernelspec": {
493-
"display_name": "Python 3",
460+
"display_name": "Python 3.9.2 64-bit",
494461
"language": "python",
495462
"name": "python3"
496463
},
@@ -504,12 +471,12 @@
504471
"name": "python",
505472
"nbconvert_exporter": "python",
506473
"pygments_lexer": "ipython3",
507-
"version": "3.8.8"
474+
"version": "3.9.2"
508475
},
509-
"colab": {
510-
"name": "mal_basics.ipynb",
511-
"provenance": [],
512-
"collapsed_sections": []
476+
"vscode": {
477+
"interpreter": {
478+
"hash": "7812ea015bdcee6f23a998adcdd2ef97c151c0c241b7b7070987d9313e41299d"
479+
}
513480
}
514481
},
515482
"nbformat": 4,

0 commit comments

Comments
 (0)