Skip to content

Commit 91b97ce

Browse files
authored
Custom embedding updates (#1580)
Deleted the old version of the custom embeddings notebook using advlib Deleted the mentions of custom embeddings pointing to advlib Made small updates in the new SDK notebook Added the embeddings parameter to the export notebook
1 parent 3ef39c7 commit 91b97ce

File tree

5 files changed

+32
-330
lines changed

5 files changed

+32
-330
lines changed

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
| Batches | [Github](basics/batches.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/batches.ipynb) |
1414
| Data Rows | [Github](basics/data_rows.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/data_rows.ipynb) |
1515
| Data Row Metadata | [Github](basics/data_row_metadata.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/data_row_metadata.ipynb) |
16+
| Custom Embeddings | [Github](basics/custom_embeddings_sdk.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/custom_embeddings_sdk.ipynb) |
1617
| Datasets | [Github](basics/datasets.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/datasets.ipynb) |
1718
| Export data | [Github](exports/export_data.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/exports/export_data.ipynb) |
1819
| Ontologies | [Github](basics/ontologies.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/ontologies.ipynb) |

examples/basics/custom_embeddings.ipynb

Lines changed: 0 additions & 305 deletions
This file was deleted.

examples/basics/custom_embeddings_sdk.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
"metadata": {},
1717
"source": [
1818
"<td>\n",
19-
"<a href=\"https://colab.research.google.com/github/Labelbox/labelbox-python/blob/master/examples/basics/custom_embeddings.ipynb\" target=\"_blank\"><img\n",
19+
"<a href=\"https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/custom_embeddings_sdk.ipynb\" target=\"_blank\"><img\n",
2020
"src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"></a>\n",
2121
"</td>\n",
2222
"\n",
2323
"<td>\n",
24-
"<a href=\"https://github.com/Labelbox/labelbox-python/tree/master/examples/basics/custom_embeddings.ipynb\" target=\"_blank\"><img\n",
24+
"<a href=\"https://github.com/Labelbox/labelbox-python/tree/develop/examples/basics/custom_embeddings_sdk.ipynb\" target=\"_blank\"><img\n",
2525
"src=\"https://img.shields.io/badge/GitHub-100000?logo=github&logoColor=white\" alt=\"GitHub\"></a>\n",
2626
"</td>"
2727
],
@@ -32,7 +32,7 @@
3232
"source": [
3333
"# Custom Embeddings\n",
3434
"\n",
35-
"You can improve your data exploration and similarity search experience by adding your own custom embeddings. Labelbox allows you to upload up to 100 different custom embeddings on any kind of data. You can experiment with different embeddings to power your data selection."
35+
"You can improve your data exploration and similarity search experience by adding your own custom embeddings. Labelbox allows you to upload up to 10 different custom embeddings per workspace on any kind of data. You can experiment with different embeddings to power your data selection."
3636
],
3737
"cell_type": "markdown"
3838
},
@@ -87,7 +87,7 @@
8787
"\n",
8888
"# get images from a Labelbox dataset\n",
8989
"# Our systems start to process data after 1000 embeddings of each type, for this demo make sure your dataset is over 1000 data rows\n",
90-
"dataset = client.get_dataset(\"<ADD YOUR DATASET ID>\")\n",
90+
"dataset = client.get_dataset(\"<DATASET-ID>\")\n",
9191
"\n",
9292
"export_task = dataset.export()\n",
9393
"export_task.wait_till_done()"
@@ -125,7 +125,6 @@
125125
"metadata": {},
126126
"source": [
127127
"data_row_ids = [dr[\"data_row\"][\"id\"] for dr in data_rows]\n",
128-
"\n",
129128
"data_row_ids = data_row_ids[:1000] # keep the first 1000 examples for the sake of this demo"
130129
],
131130
"cell_type": "code",
@@ -213,6 +212,7 @@
213212
"metadata": {},
214213
"source": [
215214
"# Create a new custom embedding, unless you want to re-use one\n",
215+
"# Name of the custom embedding must be unique\n",
216216
"embedding = client.create_embedding(\"my_custom_embedding_2048_dimensions\", 2048)"
217217
],
218218
"cell_type": "code",
@@ -223,7 +223,7 @@
223223
"metadata": {},
224224
"source": [
225225
"# Delete a custom embedding\n",
226-
"embedding.delete()"
226+
"#embedding.delete()"
227227
],
228228
"cell_type": "code",
229229
"outputs": [],

examples/basics/data_row_metadata.ipynb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -454,16 +454,6 @@
454454
"cell_type": "code",
455455
"outputs": [],
456456
"execution_count": null
457-
},
458-
{
459-
"metadata": {},
460-
"source": [
461-
"## Upload/delete/update custom embedding metadata for existing data rows\n",
462-
"\n",
463-
"For a complete tutorial on how to update, upload and delete custom embeddings please follow the steps in this [tutorial](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/master/examples/basics/custom_embeddings.ipynb).\n",
464-
"\n"
465-
],
466-
"cell_type": "markdown"
467457
}
468458
]
469459
}

0 commit comments

Comments
 (0)