docs[patch]: fix databricks metadata (#14727)

pull/14728/head
Erick Friis 7 months ago committed by GitHub
parent ff206ae30d
commit a86065c536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,15 +3,7 @@
{ {
"attachments": {}, "attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "5147e458-3b83-449e-9c2f-e7e1972e43fc",
"showTitle": false,
"title": ""
}
},
"source": [ "source": [
"# Databricks\n", "# Databricks\n",
"\n", "\n",
@ -145,15 +137,7 @@
{ {
"attachments": {}, "attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "94f6540e-40cd-4d9b-95d3-33d36f061dcc",
"showTitle": false,
"title": ""
}
},
"source": [ "source": [
"## Wrapping a serving endpoint: Custom model\n", "## Wrapping a serving endpoint: Custom model\n",
"\n", "\n",
@ -173,18 +157,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "7496dc7a-8a1a-4ce6-9648-4f69ed25275b",
"showTitle": false,
"title": ""
}
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -211,18 +184,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "0c86d952-4236-4a5e-bdac-cf4e3ccf3a16",
"showTitle": false,
"title": ""
}
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -242,18 +204,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "5f2507a2-addd-431d-9da5-dc2ae33783f6",
"showTitle": false,
"title": ""
}
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -288,18 +239,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "9b54f8ce-ffe5-4c47-a3f0-b4ebde524a6a",
"showTitle": false,
"title": ""
}
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -323,18 +263,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "50f172f5-ea1f-4ceb-8cf1-20289848de7b",
"showTitle": false,
"title": ""
}
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -370,13 +299,6 @@
"attachments": {}, "attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "8ea49319-a041-494d-afcd-87bcf00d5efb",
"showTitle": false,
"title": ""
}
}, },
"source": [ "source": [
"## Wrapping a cluster driver proxy app\n", "## Wrapping a cluster driver proxy app\n",
@ -448,18 +370,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "e3330a01-e738-4170-a176-9954aff56442",
"showTitle": false,
"title": ""
}
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -483,18 +394,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "39c121cf-0e44-4e31-91db-37fcac459677",
"showTitle": false,
"title": ""
}
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -519,18 +419,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "3d3de599-82fd-45e4-8d8b-bacfc49dc9ce",
"showTitle": false,
"title": ""
}
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -554,18 +443,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "853fae8e-8df4-41e6-9d45-7769f883fe80",
"showTitle": false,
"title": ""
}
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -607,15 +485,6 @@
} }
], ],
"metadata": { "metadata": {
"application/vnd.databricks.v1+notebook": {
"dashboards": [],
"language": "python",
"notebookMetadata": {
"pythonIndentUnit": 2
},
"notebookName": "databricks",
"widgets": {}
},
"kernelspec": { "kernelspec": {
"display_name": "Python 3 (ipykernel)", "display_name": "Python 3 (ipykernel)",
"language": "python", "language": "python",

@ -2,15 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "5a8c5767-adfe-4b9d-a665-a898756d7a6c",
"showTitle": false,
"title": ""
}
},
"source": [ "source": [
"# Databricks Vector Search\n", "# Databricks Vector Search\n",
"\n", "\n",
@ -21,15 +13,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "746cfacd-fb30-48fd-96a5-bbcc0d15ae49",
"showTitle": false,
"title": ""
}
},
"source": [ "source": [
"Install `databricks-vectorsearch` and related Python packages used in this notebook." "Install `databricks-vectorsearch` and related Python packages used in this notebook."
] ]
@ -37,15 +21,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "9258a3e7-e050-4390-9d3f-9adff1460dab",
"showTitle": false,
"title": ""
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"!pip install langchain-core databricks-vectorsearch openai tiktoken" "!pip install langchain-core databricks-vectorsearch openai tiktoken"
@ -53,15 +29,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "f4f09d6d-002d-4cb0-a664-0a83bd2a13da",
"showTitle": false,
"title": ""
}
},
"source": [ "source": [
"Use `OpenAIEmbeddings` for the embeddings." "Use `OpenAIEmbeddings` for the embeddings."
] ]
@ -69,15 +37,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "f11b902d-a772-45e0-bbd9-526218b717cc",
"showTitle": false,
"title": ""
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"import getpass\n", "import getpass\n",
@ -88,15 +48,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "59b568f3-8db2-427e-9a4a-1df6fa7a1739",
"showTitle": false,
"title": ""
}
},
"source": [ "source": [
"Split documents and get embeddings." "Split documents and get embeddings."
] ]
@ -104,15 +56,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "b28e1c7b-eae4-4be8-abbd-8433c7557dc2",
"showTitle": false,
"title": ""
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"from langchain.document_loaders import TextLoader\n", "from langchain.document_loaders import TextLoader\n",
@ -130,15 +74,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "e8fcdda1-208a-45c9-816e-ff0d2c8f59d6",
"showTitle": false,
"title": ""
}
},
"source": [ "source": [
"## Setup Databricks Vector Search client" "## Setup Databricks Vector Search client"
] ]
@ -146,15 +82,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "9b87fff1-99e5-4d9f-aba3-d21a7ccc498e",
"showTitle": false,
"title": ""
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"from databricks.vector_search.client import VectorSearchClient\n", "from databricks.vector_search.client import VectorSearchClient\n",
@ -181,15 +109,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "81090f87-3efd-4c1e-9f58-8d6adba7553d",
"showTitle": false,
"title": ""
}
},
"source": [ "source": [
"## Create Direct Vector Access Index\n", "## Create Direct Vector Access Index\n",
"Direct Vector Access Index supports direct read and write of embedding vectors and metadata through a REST API or an SDK. For this index, you manage embedding vectors and index updates yourself." "Direct Vector Access Index supports direct read and write of embedding vectors and metadata through a REST API or an SDK. For this index, you manage embedding vectors and index updates yourself."
@ -198,15 +118,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "9389ec6b-5885-411f-a26e-1a4b03651f5c",
"showTitle": false,
"title": ""
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"vector_search_endpoint_name = \"vector_search_demo_endpoint\"\n", "vector_search_endpoint_name = \"vector_search_demo_endpoint\"\n",
@ -232,15 +144,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "047a14c9-2f06-4f74-883d-815b2c69786c",
"showTitle": false,
"title": ""
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"from langchain.vectorstores import DatabricksVectorSearch\n", "from langchain.vectorstores import DatabricksVectorSearch\n",
@ -252,15 +156,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "951bd581-2ced-497f-9c70-4fda902fd3a1",
"showTitle": false,
"title": ""
}
},
"source": [ "source": [
"## Add docs to the index" "## Add docs to the index"
] ]
@ -268,15 +164,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "1e85f235-901f-4cf5-845f-5dbf4ce42078",
"showTitle": false,
"title": ""
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"dvs.add_documents(docs)" "dvs.add_documents(docs)"
@ -284,15 +172,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "8bea6f0a-b305-455a-acba-99cc8c9350b5",
"showTitle": false,
"title": ""
}
},
"source": [ "source": [
"## Similarity search" "## Similarity search"
] ]
@ -300,15 +180,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "25c5a044-a61a-4929-9e65-a0f0462925df",
"showTitle": false,
"title": ""
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"query = \"What did the president say about Ketanji Brown Jackson\"\n", "query = \"What did the president say about Ketanji Brown Jackson\"\n",
@ -318,15 +190,7 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "46e3f41b-dac2-4bed-91cb-a3914c25d275",
"showTitle": false,
"title": ""
}
},
"source": [ "source": [
"## Work with Delta Sync Index\n", "## Work with Delta Sync Index\n",
"\n", "\n",
@ -336,15 +200,7 @@
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"inputWidgets": {},
"nuid": "0c1f448e-77ca-41ce-887c-15948e866a0e",
"showTitle": false,
"title": ""
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"dvs_delta_sync = DatabricksVectorSearch(\"catalog_name.schema_name.delta_sync_index\")\n", "dvs_delta_sync = DatabricksVectorSearch(\"catalog_name.schema_name.delta_sync_index\")\n",
@ -353,15 +209,6 @@
} }
], ],
"metadata": { "metadata": {
"application/vnd.databricks.v1+notebook": {
"dashboards": [],
"language": "python",
"notebookMetadata": {
"pythonIndentUnit": 2
},
"notebookName": "databricks_vector_search",
"widgets": {}
},
"kernelspec": { "kernelspec": {
"display_name": "Python 3 (ipykernel)", "display_name": "Python 3 (ipykernel)",
"language": "python", "language": "python",

Loading…
Cancel
Save