diff --git a/examples/integrations/huggingface/huggingface.ipynb b/examples/integrations/huggingface/huggingface.ipynb new file mode 100644 index 000000000..87f0aed52 --- /dev/null +++ b/examples/integrations/huggingface/huggingface.ipynb @@ -0,0 +1,714 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": {}, + "cells": [ + { + "metadata": {}, + "source": [ + "\n", + " \n", + "" + ], + "cell_type": "markdown" + }, + { + "metadata": {}, + "source": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "cell_type": "markdown" + }, + { + "metadata": {}, + "source": [ + "# Imports" + ], + "cell_type": "markdown" + }, + { + "metadata": {}, + "source": [ + "# for labelbox\n", + "!pip3 install -q labelbox[data]\n", + "import labelbox as lb\n", + "# for custom embeddings in Labelbox\n", + "!pip3 install -q 'git+https://github.com/Labelbox/advlib.git'\n", + "#ndjson\n", + "!pip3 install -q ndjson\n", + "import ndjson\n", + "import time" + ], + "cell_type": "code", + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\u001b[?25l \u001b[90m\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u001b[0m \u001b[32m0.0/190.5 KB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u001b[0m \u001b[32m190.5/190.5 KB\u001b[0m \u001b[31m7.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m79.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Building wheel for pygeotile (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", + " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", + " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u001b[0m \u001b[32m62.8/62.8 KB\u001b[0m \u001b[31m3.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Building wheel for advlib (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n" + ] + } + ], + "execution_count": null + }, + { + "metadata": {}, + "source": [ + "# Labelbox Credentials" + ], + "cell_type": "markdown" + }, + { + "metadata": {}, + "source": [ + "API_KEY = \"\"\n", + "client = lb.Client(API_KEY)\n", + "\n", + "# set LABELBOX_API_KEY in bash\n", + "%env LABELBOX_API_KEY=$API_KEY\n", + "# sanity check it worked\n", + "!echo $LABELBOX_API_KEY" + ], + "cell_type": "code", + "outputs": [], + "execution_count": null + }, + { + "metadata": {}, + "source": [ + "# Select data rows in Labelbox for custom embeddings" + ], + "cell_type": "markdown" + }, + { + "metadata": {}, + "source": [ + "# get images from a Labelbox dataset\n", + "# 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", + "dataset = client.get_dataset(\"\")\n", + "drs = list(dataset.export_data_rows(timeout_seconds=9999))\n", + "data_row_ids = [dr.uid for dr in drs]\n", + "data_row_urls = [dr.row_data for dr in drs]\n", + "\n", + "# sanity check\n", + "print('number of data rows:',len(data_row_ids))\n", + "print('data_row_ids[0]',data_row_ids[0])\n", + "print('data_row_urls[0]',data_row_urls[0])" + ], + "cell_type": "code", + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of data rows: 42850\n", + "data_row_ids[0] clems109vbsnc073z441h8afd\n", + "data_row_urls[0] https://storage.labelbox.com/cjhfn5y6s0pk507024nz1ocys%2Fecb81372-7422-110d-843b-f73521db27a1--122.84256%2C49.212441.jpg?Expires=1678096124798&KeyName=labelbox-assets-key-3&Signature=3SLA1BMiVuN7418uosnrb2bsKFc\n" + ] + } + ], + "execution_count": null + }, + { + "metadata": {}, + "source": [ + "# Get a HuggingFace Model to generate custom embeddings" + ], + "cell_type": "markdown" + }, + { + "metadata": {}, + "source": [ + "# import HuggingFace\n", + "!pip3 install -q transformers\n", + "!pip3 install -q timm\n", + "\n", + "# load a neural network from HuggingFace \n", + "import transformers\n", + "transformers.logging.set_verbosity(50)\n", + "import torch\n", + "import torch.nn.functional as F\n", + "import PIL, requests\n", + "from tqdm import tqdm\n", + "\n", + "# get ResNet-50\n", + "image_processor = transformers.AutoImageProcessor.from_pretrained(\"microsoft/resnet-50\")\n", + "model = transformers.ResNetModel.from_pretrained(\"microsoft/resnet-50\")" + ], + "cell_type": "code", + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[2K \u001b[90m\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u001b[0m \u001b[32m6.3/6.3 MB\u001b[0m \u001b[31m52.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u001b[0m \u001b[32m7.6/7.6 MB\u001b[0m \u001b[31m92.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u001b[0m \u001b[32m190.3/190.3 KB\u001b[0m \u001b[31m20.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u001b[0m \u001b[32m549.1/549.1 KB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "109c0869d8c7450cbcf72496066b7ddf", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Downloading (\u2026)rocessor_config.json: 0%| | 0.00/266 [00:00' for total searchable embeddings\n", + "time taken for iteration: 177.07720136642456\n", + "iteration: 5120\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 171.12996554374695\n", + "iteration: 5632\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 173.94436383247375\n", + "iteration: 6144\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.43354177474976\n", + "iteration: 6656\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 178.5241401195526\n", + "iteration: 7168\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 175.9015326499939\n", + "iteration: 7680\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.44037652015686\n", + "iteration: 8192\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 180.9379448890686\n", + "iteration: 8704\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 173.93770837783813\n", + "iteration: 9216\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 173.40685057640076\n", + "iteration: 9728\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 172.36171507835388\n", + "iteration: 10240\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.7704794406891\n", + "iteration: 10752\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 173.39763069152832\n", + "iteration: 11264\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 177.25573086738586\n", + "iteration: 11776\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 184.12846732139587\n", + "iteration: 12288\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 175.39397192001343\n", + "iteration: 12800\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.75649738311768\n", + "iteration: 13312\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 185.72088646888733\n", + "iteration: 13824\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 175.83723163604736\n", + "iteration: 14336\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.651460647583\n", + "iteration: 14848\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 176.6479709148407\n", + "iteration: 15360\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 180.39876294136047\n", + "iteration: 15872\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 176.13379979133606\n", + "iteration: 16384\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.97627139091492\n", + "iteration: 16896\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 180.44990515708923\n", + "iteration: 17408\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 179.30282139778137\n", + "iteration: 17920\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 170.45787835121155\n", + "iteration: 18432\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 171.45221829414368\n", + "iteration: 18944\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.97065949440002\n", + "iteration: 19456\n", + "error: 19456\n", + "iteration: 19968\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 169.40251922607422\n", + "iteration: 20480\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 169.3802421092987\n", + "iteration: 20992\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 179.50352478027344\n", + "iteration: 21504\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 172.3904356956482\n", + "iteration: 22016\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 176.63074564933777\n", + "iteration: 22528\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 173.16236424446106\n", + "iteration: 23040\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 179.00430607795715\n", + "iteration: 23552\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 177.08420181274414\n", + "iteration: 24064\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 177.22736310958862\n", + "iteration: 24576\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 185.02283930778503\n", + "iteration: 25088\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 175.19352054595947\n", + "iteration: 25600\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 177.30881428718567\n", + "iteration: 26112\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 179.47205066680908\n", + "iteration: 26624\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 177.7000756263733\n", + "iteration: 27136\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.58914136886597\n", + "iteration: 27648\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 185.46681666374207\n", + "iteration: 28160\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 180.44694018363953\n", + "iteration: 28672\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 173.86733961105347\n", + "iteration: 29184\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 172.78347492218018\n", + "iteration: 29696\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 172.47431015968323\n", + "iteration: 30208\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 171.83157086372375\n", + "iteration: 30720\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 175.72825837135315\n", + "iteration: 31232\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 173.7845494747162\n", + "iteration: 31744\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 175.80270051956177\n", + "iteration: 32256\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 177.86151933670044\n", + "iteration: 32768\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 175.99929475784302\n", + "iteration: 33280\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 178.92519617080688\n", + "iteration: 33792\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 176.69461870193481\n", + "iteration: 34304\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 173.27711391448975\n", + "iteration: 34816\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 172.2031946182251\n", + "iteration: 35328\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.58358478546143\n", + "iteration: 35840\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.62535858154297\n", + "iteration: 36352\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 179.23003673553467\n", + "iteration: 36864\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.61723709106445\n", + "iteration: 37376\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 172.49827480316162\n", + "iteration: 37888\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 171.60905981063843\n", + "iteration: 38400\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.60000038146973\n", + "iteration: 38912\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 172.71783447265625\n", + "iteration: 39424\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 178.32006645202637\n", + "iteration: 39936\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 172.77080988883972\n", + "iteration: 40448\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 175.31893277168274\n", + "iteration: 40960\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 175.2996325492859\n", + "iteration: 41472\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 174.96231412887573\n", + "iteration: 41984\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 172.2202227115631\n", + "iteration: 42496\n", + "Uploading file: ./payload.ndjson \n", + "Progress: 100.0%\n", + "Check 'advtool embeddings count ' for total searchable embeddings\n", + "time taken for iteration: 124.40614223480225\n" + ] + } + ], + "execution_count": null + }, + { + "metadata": {}, + "source": [ + "# Check the upload went well" + ], + "cell_type": "markdown" + }, + { + "metadata": {}, + "source": [ + "# count how many data rows have a specific custom embedding\n", + "!advtool embeddings count a03948c1-151a-4a1a-b948-c1151a6a1a1d" + ], + "cell_type": "code", + "outputs": [], + "execution_count": null + }, + { + "metadata": {}, + "source": [], + "cell_type": "code", + "outputs": [], + "execution_count": null + } + ] +} \ No newline at end of file