Skip to content
Merged

3.7.0 #310

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4e92b0e
FIX: missing number type in sdk
Oct 8, 2021
00e32d4
CHG: add hierarchical name index for fields
Oct 8, 2021
a5c8844
CHG: id -> uid, add hierarchical name index for fields, index fields …
Oct 8, 2021
8adba16
ADD: exception for exceeding max number of data rows
Oct 8, 2021
21adc05
FIX: formatting
Oct 8, 2021
872ac4d
Update data_row_metadata.py
msokoloff1 Oct 8, 2021
c4caf6c
Updated the link to our Attachments documentation for the data rows t…
raphaeljafriLB Oct 8, 2021
d232dd8
Merge pull request #304 from Labelbox/gj/fix-number-type
Oct 8, 2021
dde829d
Merge pull request #305 from Labelbox/raphael/update_datarow_tutorial
Oct 8, 2021
86e7574
FIX: parsing logic
Oct 9, 2021
c2282f9
Merge remote-tracking branch 'origin/gj/fix-number-type' into gj/fix-…
Oct 9, 2021
6a60326
FIX: type conversion
Oct 9, 2021
f8c405e
CHG: relay type conversion
Oct 9, 2021
7487c13
CHG: call order
Oct 9, 2021
11cbafb
FIX: docs and reserved by name construction
Oct 9, 2021
11f26a4
FIX: type conversion
Oct 9, 2021
7b9f8b4
FIX: type conversion
Oct 9, 2021
d5a7388
FIX: type conversion
Oct 9, 2021
4cb3c4b
format
Oct 10, 2021
f154a53
Merge pull request #306 from Labelbox/gj/fix-number-type
Oct 10, 2021
4b061f8
fetch data row ids by external ids
Oct 11, 2021
126d9c8
metadata bug fixes, remove need for embeddings
Oct 11, 2021
c18e4a4
fix notebook
Oct 11, 2021
34a57a5
clean up
Oct 11, 2021
af35235
small bulk job
Oct 11, 2021
026e4e8
format
Oct 11, 2021
54d1527
Merge pull request #307 from Labelbox/ms/metadata-tests
msokoloff1 Oct 11, 2021
3032d1a
prep for release
Oct 11, 2021
bc8dc9f
update test
Oct 11, 2021
6a0d82d
format
Oct 11, 2021
8aec2aa
Merge pull request #309 from Labelbox/ms/3.7.0
msokoloff1 Oct 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
# Changelog
# Version 3.7.0 (2021-11-10)
## Added
* Search for data row ids from external ids without specifying a dataset
* `client.get_data_row_ids_for_external_ids()`
* Support for numeric metadata type

## Updated
* The following `DataRowMetadataOntology` fields were renamed:
* `all_fields` -> `fields`
* `all_fields_id_index` -> `fields_by_id`
* `reserved_id_index` -> `reserved_by_id`
* `reserved_name_index` -> `reserved_by_name`
* `custom_id_index` -> `custom_by_id`
* `custom_name_index` -> `custom_by_name`


# Version 3.6.1 (2021-07-10)
* Fix import error that appears when exporting labels

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
copyright = '2021, Labelbox'
author = 'Labelbox'

release = '3.0.0-rc0'
release = '3.7.0'

# -- General configuration ---------------------------------------------------

Expand Down
44 changes: 15 additions & 29 deletions examples/basics/data_row_metadata.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,14 @@
" DataRowMetadata,\n",
" DataRowMetadataField,\n",
" DeleteDataRowMetadata,\n",
" DataRowMetadataKind\n",
")\n",
"from sklearn.random_projection import GaussianRandomProjection\n",
"import tensorflow as tf\n",
"import seaborn as sns\n",
"from datetime import datetime\n",
"from pprint import pprint\n",
"import tensorflow_hub as hub\n",
"from datetime import datetime\n",
"from tqdm.notebook import tqdm\n",
"import requests\n",
"import tensorflow as tf\n",
"from pprint import pprint"
]
},
Expand Down Expand Up @@ -154,7 +152,7 @@
"outputs": [],
"source": [
"# dictionary access with id\n",
"pprint(mdo.all_fields_id_index, indent=2)"
"pprint(mdo.fields_by_id, indent=2)"
]
},
{
Expand All @@ -167,19 +165,8 @@
"outputs": [],
"source": [
"# access by name\n",
"split_field = mdo.reserved_name_index[\"split\"]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "uOS2QlHmqAIs",
"metadata": {
"id": "uOS2QlHmqAIs"
},
"outputs": [],
"source": [
"split_field.options"
"split_field = mdo.reserved_by_name[\"split\"]\n",
"train_field = mdo.reserved_by_name[\"split\"][\"train\"]"
]
},
{
Expand All @@ -191,7 +178,7 @@
},
"outputs": [],
"source": [
"tag_field = mdo.reserved_name_index[\"tag\"]"
"tag_field = mdo.reserved_by_name[\"tag\"]"
]
},
{
Expand Down Expand Up @@ -286,7 +273,7 @@
"outputs": [],
"source": [
"field = DataRowMetadataField(\n",
" schema_id=mdo.reserved_name_index[\"captureDateTime\"].id, # specify the schema id\n",
" schema_id=mdo.reserved_by_name[\"captureDateTime\"].id, # specify the schema id\n",
" value=datetime.now(), # typed inputs\n",
")\n",
"# Completed object ready for upload\n",
Expand Down Expand Up @@ -356,11 +343,11 @@
" # assign datarows a split\n",
" rnd = random.random()\n",
" if rnd < test:\n",
" split = \"cko8scbz70005h2dkastwhgqt\"\n",
" split = mdo.reserved_by_name[\"split\"][\"test\"]\n",
" elif rnd < valid:\n",
" split = \"cko8sc2yr0004h2dk69aj5x63\"\n",
" split = mdo.reserved_by_name[\"split\"][\"valid\"]\n",
" else:\n",
" split = \"cko8sbscr0003h2dk04w86hof\"\n",
" split = mdo.reserved_by_name[\"split\"][\"train\"]\n",
" \n",
" embeddings.append(list(model(processor(response.content), training=False)[0].numpy()))\n",
" dt = datetime.utcnow() \n",
Expand All @@ -371,15 +358,15 @@
" data_row_id=datarow.uid,\n",
" fields=[\n",
" DataRowMetadataField(\n",
" schema_id=mdo.reserved_name_index[\"captureDateTime\"].id,\n",
" schema_id=mdo.reserved_by_name[\"captureDateTime\"].uid,\n",
" value=dt,\n",
" ),\n",
" DataRowMetadataField(\n",
" schema_id=mdo.reserved_name_index[\"split\"].id,\n",
" value=split\n",
" schema_id=split.parent,\n",
" value=split.uid\n",
" ),\n",
" DataRowMetadataField(\n",
" schema_id=mdo.reserved_name_index[\"tag\"].id,\n",
" schema_id=mdo.reserved_by_name[\"tag\"].uid,\n",
" value=message\n",
" ),\n",
" ]\n",
Expand Down Expand Up @@ -438,7 +425,7 @@
"for md, embd in zip(uploads, projected):\n",
" md.fields.append(\n",
" DataRowMetadataField(\n",
" schema_id=mdo.reserved_name_index[\"embedding\"].id,\n",
" schema_id=mdo.reserved_by_name[\"embedding\"].uid,\n",
" value=embd.tolist(), # convert from numpy to list\n",
" ),\n",
" )"
Expand Down Expand Up @@ -568,7 +555,6 @@
"fields = []\n",
"# iterate through the fields you want to delete\n",
"for field in md.fields:\n",
" schema = mdo.all_fields_id_index[field.schema_id]\n",
" fields.append(field.schema_id)\n",
"\n",
"deletes = DeleteDataRowMetadata(\n",
Expand Down
33 changes: 3 additions & 30 deletions examples/basics/data_rows.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
"cells": [
{
"cell_type": "markdown",
"id": "premier-olympus",
"metadata": {},
"source": [
"# Data rows"
]
},
{
"cell_type": "markdown",
"id": "affecting-former",
"metadata": {},
"source": [
"* Data rows are the items that are actually being labeled. We currently support the following:\n",
Expand All @@ -25,7 +23,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "posted-nation",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -35,7 +32,6 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "beautiful-ready",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -48,7 +44,6 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "vertical-stockholm",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -70,7 +65,6 @@
},
{
"cell_type": "markdown",
"id": "legendary-harvard",
"metadata": {},
"source": [
"* Set the following cell with your data to run this notebook"
Expand All @@ -79,7 +73,6 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "rural-fellow",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -93,7 +86,6 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "proof-detective",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -103,7 +95,6 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "selective-reconstruction",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -115,7 +106,6 @@
},
{
"cell_type": "markdown",
"id": "registered-cause",
"metadata": {},
"source": [
"### Read"
Expand All @@ -124,7 +114,6 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "extra-paris",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -135,7 +124,6 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "packed-going",
"metadata": {},
"outputs": [
{
Expand All @@ -158,7 +146,6 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "above-vocabulary",
"metadata": {},
"outputs": [
{
Expand All @@ -177,7 +164,6 @@
},
{
"cell_type": "markdown",
"id": "successful-patch",
"metadata": {},
"source": [
"### Create\n",
Expand All @@ -187,7 +173,6 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "medical-portuguese",
"metadata": {},
"outputs": [
{
Expand All @@ -213,7 +198,6 @@
},
{
"cell_type": "markdown",
"id": "helpful-lingerie",
"metadata": {},
"source": [
"* Bulk create data rows (This is much faster than creating individual data rows)"
Expand All @@ -222,7 +206,6 @@
{
"cell_type": "code",
"execution_count": 10,
"id": "round-perfume",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -236,7 +219,6 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "breeding-brother",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -251,7 +233,6 @@
{
"cell_type": "code",
"execution_count": 12,
"id": "thrown-designation",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -264,7 +245,6 @@
{
"cell_type": "code",
"execution_count": 13,
"id": "japanese-jefferson",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -280,7 +260,6 @@
{
"cell_type": "code",
"execution_count": 14,
"id": "accessible-effort",
"metadata": {},
"outputs": [
{
Expand All @@ -303,7 +282,6 @@
},
{
"cell_type": "markdown",
"id": "interested-proxy",
"metadata": {},
"source": [
"### Update"
Expand All @@ -312,7 +290,6 @@
{
"cell_type": "code",
"execution_count": 15,
"id": "floral-elimination",
"metadata": {},
"outputs": [
{
Expand All @@ -333,7 +310,6 @@
{
"cell_type": "code",
"execution_count": 16,
"id": "collect-cosmetic",
"metadata": {},
"outputs": [
{
Expand All @@ -352,13 +328,12 @@
"# Attachments are visible for all projects connected to the data_row \n",
"data_row.create_attachment(attachment_type=\"TEXT\", attachment_value=\"LABELERS WILL SEE THIS \")\n",
"# See more information here:\n",
"# https://docs.labelbox.com/data-model/en/index-en#attachments\n",
"# https://docs.labelbox.com/reference/type-image\n",
"# Note that attachment_value must always be a string (url to a video/image or a text value to display)"
]
},
{
"cell_type": "markdown",
"id": "explicit-morrison",
"metadata": {},
"source": [
"### Delete"
Expand All @@ -367,7 +342,6 @@
{
"cell_type": "code",
"execution_count": 17,
"id": "dental-banana",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -378,7 +352,6 @@
{
"cell_type": "code",
"execution_count": 18,
"id": "binary-organic",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -389,7 +362,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -403,7 +376,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion labelbox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "labelbox"
__version__ = "3.6.1"
__version__ = "3.7.0"

from labelbox.schema.project import Project
from labelbox.client import Client
Expand Down
Loading