Skip to content

Commit

Permalink
using inference id in query vector builder
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffvestal committed May 22, 2024
1 parent c42411a commit 088d9fd
Showing 1 changed file with 65 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@
"base_uri": "https://localhost:8080/"
},
"id": "d3oRV05q7p6_",
"outputId": "7cd618ee-2abb-421f-c6dd-7c171a6c4b84"
"outputId": "dda20a96-6969-4f02-f942-158c540ae309"
},
"execution_count": null,
"execution_count": 1,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m477.5/477.5 kB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m64.3/64.3 kB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m477.5/477.5 kB\u001b[0m \u001b[31m3.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m64.3/64.3 kB\u001b[0m \u001b[31m2.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25h"
]
}
Expand Down Expand Up @@ -104,7 +104,7 @@
"metadata": {
"id": "R8aownZy7f9e"
},
"execution_count": null,
"execution_count": 2,
"outputs": []
},
{
Expand All @@ -126,20 +126,19 @@
"base_uri": "https://localhost:8080/"
},
"id": "X9GwAcZFv62y",
"outputId": "f44581b3-b002-4772-fab8-197caf33c500"
"outputId": "f54a5f25-de2f-4bf2-ab40-8492fd9f63b9"
},
"execution_count": null,
"execution_count": 3,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Warning: Looks like you're using an outdated API Version, please consider updating (server 1.6.14 / client 1.6.12)\n",
"Dataset URL: https://www.kaggle.com/datasets/ashpalsingh1525/imdb-movies-dataset\n",
"License(s): Community Data License Agreement - Permissive - Version 1.0\n",
"Downloading imdb-movies-dataset.zip to /content\n",
" 0% 0.00/2.84M [00:00<?, ?B/s]\n",
"100% 2.84M/2.84M [00:00<00:00, 60.2MB/s]\n"
"100% 2.84M/2.84M [00:00<00:00, 117MB/s]\n"
]
}
]
Expand All @@ -153,7 +152,7 @@
"metadata": {
"id": "2RcWHGd3v-U3"
},
"execution_count": null,
"execution_count": 4,
"outputs": []
},
{
Expand Down Expand Up @@ -226,9 +225,9 @@
"base_uri": "https://localhost:8080/"
},
"id": "Lz8fwc3dtHUM",
"outputId": "6a93a43f-2705-4098-e8b2-2835ca51f740"
"outputId": "fca753fe-b0b3-4767-9f47-607189004a74"
},
"execution_count": null,
"execution_count": 5,
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -270,15 +269,15 @@
"base_uri": "https://localhost:8080/"
},
"id": "h-lOUnts-d8a",
"outputId": "11f5e100-6c1b-426a-94e7-086d9ee56761"
"outputId": "e9b7c525-f014-43b1-da77-4b409fcb58fb"
},
"execution_count": null,
"execution_count": 6,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"201 - {\"alias\":\"retrievers-demo-b9b8ba\",\"cloud_id\":\"Retrievers_Demo:dXMtZWFzdC0xLmF3cy5lbGFzdGljLmNsb3VkJGI5YjhiYWJhNjNmYjQ0ZDA4MmY0MzNlN2NjY2U0ZWQ3LmVzJGI5YjhiYWJhNjNmYjQ0ZDA4MmY0MzNlN2NjY2U0ZWQ3Lmti\",\"id\":\"b9b8baba63fb44d082f433e7ccce4ed7\",\"metadata\":{\"created_at\":\"2024-05-20T18:09:38.808701725Z\",\"created_by\":\"3953873479\",\"organization_id\":\"3953873479\"},\"name\":\"Retrievers Demo\",\"region_id\":\"aws-us-east-1\",\"endpoints\":{\"elasticsearch\":\"https://retrievers-demo-b9b8ba.es.us-east-1.aws.elastic.cloud\",\"kibana\":\"https://retrievers-demo-b9b8ba.kb.us-east-1.aws.elastic.cloud\"},\"optimized_for\":\"vector\",\"search_lake\":{\"boost_window\":0,\"search_power\":5},\"type\":\"elasticsearch\",\"credentials\":{\"password\":\"j258GUx85ra2uKp3Qwpk0o09\",\"username\":\"admin\"}}\n",
"201 - {\"alias\":\"retrievers-demo-d1ff7a\",\"cloud_id\":\"Retrievers_Demo:dXMtZWFzdC0xLmF3cy5lbGFzdGljLmNsb3VkJGQxZmY3YWZmMWE5YTQ1ODZhNDBkMzk1ZjZlMGJhMDk3LmVzJGQxZmY3YWZmMWE5YTQ1ODZhNDBkMzk1ZjZlMGJhMDk3Lmti\",\"id\":\"d1ff7aff1a9a4586a40d395f6e0ba097\",\"metadata\":{\"created_at\":\"2024-05-22T00:57:10.550790086Z\",\"created_by\":\"3953873479\",\"organization_id\":\"3953873479\"},\"name\":\"Retrievers Demo\",\"region_id\":\"aws-us-east-1\",\"endpoints\":{\"elasticsearch\":\"https://retrievers-demo-d1ff7a.es.us-east-1.aws.elastic.cloud\",\"kibana\":\"https://retrievers-demo-d1ff7a.kb.us-east-1.aws.elastic.cloud\"},\"optimized_for\":\"vector\",\"search_lake\":{\"boost_window\":0,\"search_power\":5},\"type\":\"elasticsearch\",\"credentials\":{\"password\":\"p4Y1hd8j4qF5gl5E5d0S5Ya5\",\"username\":\"admin\"}}\n",
"\n"
]
}
Expand All @@ -304,7 +303,7 @@
"metadata": {
"id": "NohlsUagch98"
},
"execution_count": null,
"execution_count": 7,
"outputs": []
},
{
Expand Down Expand Up @@ -336,9 +335,9 @@
"base_uri": "https://localhost:8080/"
},
"id": "AQepIFokswoR",
"outputId": "a0438dba-aeb0-43c8-9e7e-49fefcd928f6"
"outputId": "5230db4e-e474-4f8d-ad93-2c2fa4fc21f5"
},
"execution_count": null,
"execution_count": 8,
"outputs": [
{
"output_type": "stream",
Expand Down Expand Up @@ -386,7 +385,7 @@
"metadata": {
"id": "PLvy4pY6FnPF"
},
"execution_count": null,
"execution_count": 9,
"outputs": []
},
{
Expand Down Expand Up @@ -420,7 +419,7 @@
"metadata": {
"id": "9cp9b_E9GCpM"
},
"execution_count": null,
"execution_count": 10,
"outputs": []
},
{
Expand Down Expand Up @@ -483,16 +482,16 @@
"base_uri": "https://localhost:8080/"
},
"id": "QDCjzqEwysKa",
"outputId": "ab12fce3-1d82-45fd-fc70-b06d3af88fdc"
"outputId": "cd526dec-e89a-4024-e5fb-dd7cee4fb8c3"
},
"execution_count": null,
"execution_count": 11,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
".elser_model_2_linux-x86_64 model deployed and started\n",
".multilingual-e5-small_linux-x86_64 model deployed and started\n"
".multilingual-e5-small_linux-x86_64 model deployed and started\n",
".elser_model_2_linux-x86_64 model deployed and started\n"
]
}
]
Expand Down Expand Up @@ -553,9 +552,9 @@
"base_uri": "https://localhost:8080/"
},
"id": "WvrQ2tOjxssp",
"outputId": "227d7e5c-e5e4-45d0-c4bb-7a8ac6aab749"
"outputId": "d1465aab-22d1-44dc-a02c-c5e00ad517a5"
},
"execution_count": null,
"execution_count": 12,
"outputs": [
{
"output_type": "execute_result",
Expand Down Expand Up @@ -642,10 +641,25 @@
"es.ingest.put_pipeline(id=\"elser_e5_embed\", body=pipeline_body)"
],
"metadata": {
"id": "B8Gxm6mGstH0"
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "B8Gxm6mGstH0",
"outputId": "f955e1f3-5b79-4fe0-8e02-476691b3fb0f"
},
"execution_count": null,
"outputs": []
"execution_count": 13,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"ObjectApiResponse({'acknowledged': True})"
]
},
"metadata": {},
"execution_count": 13
}
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -698,15 +712,15 @@
"base_uri": "https://localhost:8080/"
},
"id": "NgYlVtRaEEJQ",
"outputId": "a0d314e0-4231-49b9-f851-701305af6883"
"outputId": "c39fca25-e964-4325-83fe-8d83d7bf42cf"
},
"execution_count": null,
"execution_count": 14,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"The function took 159.78582906723022 seconds to run\n"
"The function took 180.07549405097961 seconds to run\n"
]
}
]
Expand Down Expand Up @@ -735,7 +749,7 @@
"metadata": {
"id": "bfcjA76VqRMD"
},
"execution_count": null,
"execution_count": 15,
"outputs": []
},
{
Expand Down Expand Up @@ -766,7 +780,7 @@
"metadata": {
"id": "tb-M-FqSdHa0"
},
"execution_count": 21,
"execution_count": 16,
"outputs": []
},
{
Expand Down Expand Up @@ -799,9 +813,9 @@
"base_uri": "https://localhost:8080/"
},
"id": "MSCPBLRWEEjH",
"outputId": "724506f6-3f1a-4583-f62f-abcd51d2d423"
"outputId": "7d9e5d1e-ad63-4165-94ae-6e6949112974"
},
"execution_count": 24,
"execution_count": 17,
"outputs": [
{
"output_type": "stream",
Expand Down Expand Up @@ -840,7 +854,7 @@
" \"field\": \"overview_dense\",\n",
" \"query_vector_builder\": {\n",
" \"text_embedding\": {\n",
" \"model_id\": \".multilingual-e5-small_linux-x86_64\",\n",
" \"model_id\": \"my-e5-model\",\n",
" \"model_text\": movie_search,\n",
" }\n",
" },\n",
Expand All @@ -862,9 +876,9 @@
"base_uri": "https://localhost:8080/"
},
"id": "M5LjVfhhELQB",
"outputId": "ff31c1ea-6389-4c12-f626-6189ab29463e"
"outputId": "c621f71c-b8aa-42d8-d839-c2a33646024e"
},
"execution_count": 25,
"execution_count": 18,
"outputs": [
{
"output_type": "stream",
Expand All @@ -873,11 +887,11 @@
"Beavis and Butt-Head Do America\n",
"- Slacker duo Beavis and Butt-Head wake to discover their TV has been stolen. Their search for a new one takes them on a clueless adventure across America, during which they manage to accidentally become America's most wanted.\n",
"\n",
"Honey, We Shrunk Ourselves\n",
"- The joke's on absent-minded scientist Wayne Szalinski when his troublesome invention shrinks him, his brother and their wives so effectively that their children think they've completely disappeared. Of course, this gives the kids free rein to do anything they want, unaware that their parents are watching every move.\n",
"\n",
"Uncharted\n",
"- A young street-smart, Nathan Drake and his wisecracking partner Victor “Sully” Sullivan embark on a dangerous pursuit of “the greatest treasure never found” while also tracking clues that may lead to Nathan’s long-lost brother.\n",
"\n",
"Crystal Skulls\n",
"- A millionaire philanthropist collects the famous Crystal Skulls trying to tap into their ancient powers. It is up to a team lead by a college professor whose father disappeared searching for the 13th skull to save the world when the first 12 skulls are united and reek havoc on the earth without the control of the 13th skull.\n",
"\n"
]
}
Expand All @@ -903,7 +917,7 @@
" \"query\": {\n",
" \"text_expansion\": {\n",
" \"overview_sparse\": {\n",
" \"model_id\": \".elser_model_2_linux-x86_64\",\n",
" \"model_id\": \"my-elser-model\",\n",
" \"model_text\": movie_search,\n",
" }\n",
" }\n",
Expand All @@ -924,9 +938,9 @@
"base_uri": "https://localhost:8080/"
},
"id": "DBME24ECENT_",
"outputId": "f7a02132-d13f-4ed0-fc1f-1413babcbdb3"
"outputId": "868c950c-e568-4436-cca5-a6b0f30be70d"
},
"execution_count": 26,
"execution_count": 19,
"outputs": [
{
"output_type": "stream",
Expand Down Expand Up @@ -969,7 +983,7 @@
" \"field\": \"overview_dense\",\n",
" \"query_vector_builder\": {\n",
" \"text_embedding\": {\n",
" \"model_id\": \".multilingual-e5-small_linux-x86_64\",\n",
" \"model_id\": \"my-e5-model\",\n",
" \"model_text\": movie_search,\n",
" }\n",
" },\n",
Expand All @@ -982,7 +996,7 @@
" \"query\": {\n",
" \"text_expansion\": {\n",
" \"overview_sparse\": {\n",
" \"model_id\": \".elser_model_2_linux-x86_64\",\n",
" \"model_id\": \"my-elser-model\",\n",
" \"model_text\": movie_search,\n",
" }\n",
" }\n",
Expand All @@ -1008,9 +1022,9 @@
"base_uri": "https://localhost:8080/"
},
"id": "uS7iGJZFEP72",
"outputId": "29ec813f-c4c8-491f-9459-60f5b77d469b"
"outputId": "cc983b10-cbd3-4fc4-9844-8ed59b00d803"
},
"execution_count": 27,
"execution_count": 20,
"outputs": [
{
"output_type": "stream",
Expand All @@ -1022,8 +1036,8 @@
"Bill & Ted's Bogus Journey\n",
"- Amiable slackers Bill and Ted are once again roped into a fantastical adventure when De Nomolos, a villain from the future, sends evil robot duplicates of the two lads to terminate and replace them. The robot doubles actually succeed in killing Bill and Ted, but the two are determined to escape the afterlife, challenging the Grim Reaper to a series of games in order to return to the land of the living.\n",
"\n",
"Honey, We Shrunk Ourselves\n",
"- The joke's on absent-minded scientist Wayne Szalinski when his troublesome invention shrinks him, his brother and their wives so effectively that their children think they've completely disappeared. Of course, this gives the kids free rein to do anything they want, unaware that their parents are watching every move.\n",
"Uncharted\n",
"- A young street-smart, Nathan Drake and his wisecracking partner Victor “Sully” Sullivan embark on a dangerous pursuit of “the greatest treasure never found” while also tracking clues that may lead to Nathan’s long-lost brother.\n",
"\n"
]
}
Expand Down

0 comments on commit 088d9fd

Please sign in to comment.