diff --git a/superduper/base/event.py b/superduper/base/event.py index a1c8bf756..3e484344f 100644 --- a/superduper/base/event.py +++ b/superduper/base/event.py @@ -252,6 +252,7 @@ def execute(self, db: 'Datalayer'): events = { 'signal': Signal, 'change': Change, + 'update': Update, 'create': Create, 'job': Job, } diff --git a/templates/simple_rag/build.ipynb b/templates/simple_rag/build.ipynb index ff3386195..d78ce1b25 100644 --- a/templates/simple_rag/build.ipynb +++ b/templates/simple_rag/build.ipynb @@ -42,7 +42,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "3ef70f6d-a189-460a-8864-241a689624e2", "metadata": { "editable": true, @@ -65,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "cb029a5e-fedf-4f07-8a31-d220cfbfbb3d", "metadata": { "editable": true, @@ -74,7 +74,24 @@ }, "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[32m2024-Dec-03 10:16:47.82\u001b[0m| \u001b[1mINFO \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.misc.plugins\u001b[0m:\u001b[36m13 \u001b[0m | \u001b[1mLoading plugin: ibis\u001b[0m\n", + "\u001b[32m2024-Dec-03 10:16:48.16\u001b[0m| \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper_ibis.data_backend\u001b[0m:\u001b[36m112 \u001b[0m | \u001b[33m\u001b[1mUnable to connect to the database with self.conn.con: and self.name: sqlite:. Error: 'sqlite3.Connection' object has no attribute 'dialect'.\u001b[0m\n", + "\u001b[32m2024-Dec-03 10:16:48.16\u001b[0m| \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper_ibis.data_backend\u001b[0m:\u001b[36m116 \u001b[0m | \u001b[33m\u001b[1mFalling back to using the uri: sqlite://.\u001b[0m\n", + "\u001b[32m2024-Dec-03 10:16:48.17\u001b[0m| \u001b[1mINFO \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.base.datalayer\u001b[0m:\u001b[36m68 \u001b[0m | \u001b[1mBuilding Data Layer\u001b[0m\n", + "\u001b[32m2024-Dec-03 10:16:48.17\u001b[0m| \u001b[1mINFO \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.base.build\u001b[0m:\u001b[36m184 \u001b[0m | \u001b[1mConfiguration: \n", + " +---------------+-----------+\n", + "| Configuration | Value |\n", + "+---------------+-----------+\n", + "| Data Backend | sqlite:// |\n", + "+---------------+-----------+\u001b[0m\n" + ] + } + ], "source": [ "from superduper import superduper, CFG\n", "\n", @@ -86,7 +103,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "4e7902bd", "metadata": { "editable": true, @@ -113,7 +130,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "id": "9b4dbc0f-5a0a-423c-ad47-f3e4b3cbc950", "metadata": {}, "outputs": [], @@ -123,17 +140,28 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "3cef697d-63b7-43d8-af45-b7751323b7f6", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{'getter': 'default'}" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "RemoteData._fields" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "id": "1ef8dd07-1b47-4dce-84dd-a081d1f5ee9d", "metadata": {}, "outputs": [], @@ -155,7 +183,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "id": "c5965fdf", "metadata": {}, "outputs": [], @@ -189,7 +217,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "id": "2d20eaa0-a416-4483-938e-23f79845739a", "metadata": {}, "outputs": [], @@ -217,7 +245,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "id": "93d21872-d4dc-40dc-abab-fb07ba102ea3", "metadata": {}, "outputs": [], @@ -236,7 +264,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "id": "31900eec-b516-4bef-939e-2e8f46252b12", "metadata": {}, "outputs": [], @@ -284,7 +312,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "id": "a9b1f538-65ca-499e-b6d0-2dd733f81723", "metadata": {}, "outputs": [], @@ -309,7 +337,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "id": "4663fa4b-c2ec-427d-bf8b-b8b109cc2ccf", "metadata": {}, "outputs": [], @@ -332,7 +360,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "id": "509c3505-54c5-4e68-84ec-3df8bea0fd74", "metadata": {}, "outputs": [], @@ -352,7 +380,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "id": "f98e5ff4", "metadata": {}, "outputs": [], @@ -376,7 +404,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "id": "44baeb09-6f35-4cf2-b814-46283a59f7e9", "metadata": {}, "outputs": [], @@ -403,7 +431,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "id": "2d3a0d3a-da1c-41ec-b16c-f281c46ad794", "metadata": {}, "outputs": [], @@ -422,10 +450,19 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "id": "e6787c78-4b14-4a72-818b-450408a74331", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[32m2024-Dec-03 10:16:48.96\u001b[0m| \u001b[1mINFO \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.components.application\u001b[0m:\u001b[36m39 \u001b[0m | \u001b[1mResorting components based on topological order.\u001b[0m\n", + "\u001b[32m2024-Dec-03 10:16:48.96\u001b[0m| \u001b[1mINFO \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.components.application\u001b[0m:\u001b[36m56 \u001b[0m | \u001b[1mNew order of components: ['listener:chunker:f4e285cb704a41c3', 'vector_index:vectorindex:dbd493f4bbe3408a', 'model:simple_rag:a9ff704a42644185']\u001b[0m\n" + ] + } + ], "source": [ "from superduper import Application\n", "\n", @@ -441,7 +478,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "id": "e7c16557-af76-4e70-83d9-2984e19a9554", "metadata": {}, "outputs": [], @@ -452,7 +489,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "id": "2a82ea22-9694-4c65-b72f-c89ae49d1ab2", "metadata": {}, "outputs": [], @@ -479,10 +516,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "id": "2e850c03-33c6-4c88-95d3-d14146a6a0af", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[32m2024-Dec-03 10:16:48.97\u001b[0m| \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.components.listener\u001b[0m:\u001b[36m74 \u001b[0m | \u001b[33m\u001b[1moutput_table not found in listener.dict()\u001b[0m\n", + "\u001b[32m2024-Dec-03 10:16:48.97\u001b[0m| \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.components.listener\u001b[0m:\u001b[36m74 \u001b[0m | \u001b[33m\u001b[1moutput_table not found in listener.dict()\u001b[0m\n", + "\u001b[32m2024-Dec-03 10:16:48.97\u001b[0m| \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.base.document\u001b[0m:\u001b[36m558 \u001b[0m | \u001b[33m\u001b[1mLeaf listener:chunker already exists\u001b[0m\n", + "\u001b[32m2024-Dec-03 10:16:48.97\u001b[0m| \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.components.listener\u001b[0m:\u001b[36m74 \u001b[0m | \u001b[33m\u001b[1moutput_table not found in listener.dict()\u001b[0m\n", + "\u001b[32m2024-Dec-03 10:16:48.97\u001b[0m| \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.base.document\u001b[0m:\u001b[36m558 \u001b[0m | \u001b[33m\u001b[1mLeaf model:chunker already exists\u001b[0m\n", + "\u001b[32m2024-Dec-03 10:16:48.98\u001b[0m| \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.base.document\u001b[0m:\u001b[36m558 \u001b[0m | \u001b[33m\u001b[1mLeaf var-table-name-select-var-id-field-x already exists\u001b[0m\n" + ] + } + ], "source": [ "from superduper import Template, Table, Schema\n", "from superduper.components.dataset import RemoteData\n", @@ -537,20 +587,39 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "id": "66d77fc5-65e9-4f2d-ac74-13c8fa3c3acc", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "Schema(identifier='RemoteData/class_schema', uuid='09196795da834f25', upstream=None, plugins=None, cache=True, status=None, build_variables=None, build_template=None, fields={'getter': DillSerializer(identifier='default', uuid='0e8771fabb3a4624', upstream=None, plugins=None, cache=True, status=None, build_variables=None, build_template=None)})" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "template.default_table.data.build_class_schema()" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "id": "8924ba0d-7c01-4d6c-87fb-245531db7506", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[32m2024-Dec-03 10:16:48.99\u001b[0m| \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mDuncans-MBP.fritz.box\u001b[0m| \u001b[36msuperduper.base.document\u001b[0m:\u001b[36m558 \u001b[0m | \u001b[33m\u001b[1mLeaf str already exists\u001b[0m\n" + ] + } + ], "source": [ "template.export('.')" ] diff --git a/templates/simple_rag/component.json b/templates/simple_rag/component.json index ddd7df315..f88d312c6 100644 --- a/templates/simple_rag/component.json +++ b/templates/simple_rag/component.json @@ -276,4 +276,4 @@ } }, "_files": {} -} \ No newline at end of file +}