Skip to content

Commit 7638536

Browse files
author
Gareth
authored
Merge pull request #410 from Labelbox/gj/fix-metadata-notebook
Update datarow metadata tutorial
2 parents 89c7877 + 53a4c04 commit 7638536

File tree

1 file changed

+36
-37
lines changed

1 file changed

+36
-37
lines changed

examples/basics/data_row_metadata.ipynb

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,7 @@
2424
"source": [
2525
"## Overview\n",
2626
"\n",
27-
"We are launching a new feature called DataRow Metadata. Metadata is being developed to help users better understand their data to help with labeling, model diagnostics, and data selection. This **should not be confused with attachements** formerly called metadata. Attachments provides additional context for labelers but is not searchable within Catalog.\n",
28-
"\n",
29-
"The metadata feature is in beta and aspect are subject change. During the Beta data must metadata must be uploaded to ***reserved fields*** defined by Labelbox. In the near future we will support user defined ***custom fields***. THe current available fields are:\n",
30-
"\n",
31-
"* **tag**: a free text field\n",
32-
"* **split**: enum of train-valid-test\n",
33-
"* **captureDateTime**: ISO 8601 datetime field. All times must be in UTC\n",
34-
"* **embedding**: A 128 length list 32 bit floats used for similarity search. All datarows share the same similarity index."
27+
"Metadata is useful to be better understand data on the platform to help with labeling review, model diagnostics, and data selection. This **should not be confused with attachments**. Attachments provide additional context for labelers but is not searchable within Catalog."
3528
]
3629
},
3730
{
@@ -41,9 +34,7 @@
4134
"id": "f61dSEA0o4zY"
4235
},
4336
"source": [
44-
"### Installation\n",
45-
"\n",
46-
"You must install a `3.0.0` release or above of the SDK"
37+
"### Installation"
4738
]
4839
},
4940
{
@@ -120,14 +111,25 @@
120111
"source": [
121112
"## Metadata ontology\n",
122113
"\n",
123-
"We use a similar system for managing metadata as we do feature schemas. Metadata scheams are strongly typed to ensure we can provide the best experience in the App. Each metadata field can be uniquely accessed by id. Names are unique within the kind of metadata, reserved or custom.\n",
114+
"We use a similar system for managing metadata as we do feature schemas. Metadata schemas are strongly typed to ensure we can provide the best experience in the App. Each metadata field can be uniquely accessed by id. Names are unique within the kind of metadata, reserved or custom. A DataRow can have a maximum of 5 metadata fields at a time.\n",
124115
"\n",
125-
"Metadata fields support a couple of core kinds:\n",
116+
"### Metadata kinds\n",
126117
"\n",
127118
"* **Enum**: A classification with options, only one option can be selected at a time\n",
128119
"* **DateTime**: A utc ISO datetime \n",
129120
"* **Embedding**: 128 float 32 vector used for similarity\n",
130-
"* **String**: A string of less than 500 characters"
121+
"* **String**: A string of less than 500 characters\n",
122+
"\n",
123+
"### Reserved fields\n",
124+
"\n",
125+
"* **tag**: a free text field\n",
126+
"* **split**: enum of train-valid-test\n",
127+
"* **captureDateTime**: ISO 8601 datetime field. All times must be in UTC\n",
128+
"* **embedding**: A 128 length list 32 bit floats used for similarity search. All datarows share the same similarity index.\n",
129+
"\n",
130+
"### Custom fields\n",
131+
"\n",
132+
"You can create your own fields from within the app by navigating to the [metadata schema page](https://app.labelbox.com/schema/metadata)"
131133
]
132134
},
133135
{
@@ -431,22 +433,15 @@
431433
" )"
432434
]
433435
},
434-
{
435-
"cell_type": "markdown",
436-
"id": "1x-5KSChNSpK",
437-
"metadata": {
438-
"id": "1x-5KSChNSpK"
439-
},
440-
"source": [
441-
"### Upload"
442-
]
443-
},
444436
{
445437
"cell_type": "code",
446438
"execution_count": null,
447439
"id": "-FUkp4CEPuzx",
448440
"metadata": {
449-
"id": "-FUkp4CEPuzx"
441+
"id": "-FUkp4CEPuzx",
442+
"pycharm": {
443+
"is_executing": true
444+
}
450445
},
451446
"outputs": [],
452447
"source": [
@@ -465,6 +460,17 @@
465460
"Currently there is no option for exporting metadata in bulk. We will be working to support that functionality in the near future."
466461
]
467462
},
463+
{
464+
"cell_type": "markdown",
465+
"source": [
466+
"### Upload\n",
467+
"\n",
468+
"Uploads will overwrite the current value for the feature if it is already present."
469+
],
470+
"metadata": {
471+
"collapsed": false
472+
}
473+
},
468474
{
469475
"cell_type": "code",
470476
"execution_count": null,
@@ -592,22 +598,15 @@
592598
"execution_count": null,
593599
"id": "rKdJhVcEIDku",
594600
"metadata": {
595-
"id": "rKdJhVcEIDku"
601+
"id": "rKdJhVcEIDku",
602+
"pycharm": {
603+
"name": "#%%\n"
604+
}
596605
},
597606
"outputs": [],
598607
"source": [
599608
"len(mdo.bulk_export(deletes.data_row_id)[0].fields)"
600609
]
601-
},
602-
{
603-
"cell_type": "markdown",
604-
"id": "Y27__uc10GwA",
605-
"metadata": {
606-
"id": "Y27__uc10GwA"
607-
},
608-
"source": [
609-
"### Tell us more about the features you want [here](https://portal.productboard.com/t8t5vu6cutoerk4wsskkpyzr)"
610-
]
611610
}
612611
],
613612
"metadata": {
@@ -636,4 +635,4 @@
636635
},
637636
"nbformat": 4,
638637
"nbformat_minor": 5
639-
}
638+
}

0 commit comments

Comments
 (0)