Skip to content

Commit

Permalink
Fix missing key in event-types
Browse files Browse the repository at this point in the history
  • Loading branch information
blythed committed Dec 3, 2024
1 parent 2576105 commit 7cde03f
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 29 deletions.
1 change: 1 addition & 0 deletions superduper/base/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def execute(self, db: 'Datalayer'):
events = {
'signal': Signal,
'change': Change,
'update': Update,
'create': Create,
'job': Job,
}
Expand Down
125 changes: 97 additions & 28 deletions templates/simple_rag/build.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "3ef70f6d-a189-460a-8864-241a689624e2",
"metadata": {
"editable": true,
Expand All @@ -65,7 +65,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "cb029a5e-fedf-4f07-8a31-d220cfbfbb3d",
"metadata": {
"editable": true,
Expand All @@ -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: <sqlite3.Connection object at 0x1230cfd40> 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",
Expand All @@ -86,7 +103,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "4e7902bd",
"metadata": {
"editable": true,
Expand All @@ -113,7 +130,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "9b4dbc0f-5a0a-423c-ad47-f3e4b3cbc950",
"metadata": {},
"outputs": [],
Expand All @@ -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": [],
Expand All @@ -155,7 +183,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"id": "c5965fdf",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -189,7 +217,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"id": "2d20eaa0-a416-4483-938e-23f79845739a",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -217,7 +245,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"id": "93d21872-d4dc-40dc-abab-fb07ba102ea3",
"metadata": {},
"outputs": [],
Expand All @@ -236,7 +264,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"id": "31900eec-b516-4bef-939e-2e8f46252b12",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -284,7 +312,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 11,
"id": "a9b1f538-65ca-499e-b6d0-2dd733f81723",
"metadata": {},
"outputs": [],
Expand All @@ -309,7 +337,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 12,
"id": "4663fa4b-c2ec-427d-bf8b-b8b109cc2ccf",
"metadata": {},
"outputs": [],
Expand All @@ -332,7 +360,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 13,
"id": "509c3505-54c5-4e68-84ec-3df8bea0fd74",
"metadata": {},
"outputs": [],
Expand All @@ -352,7 +380,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 14,
"id": "f98e5ff4",
"metadata": {},
"outputs": [],
Expand All @@ -376,7 +404,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 15,
"id": "44baeb09-6f35-4cf2-b814-46283a59f7e9",
"metadata": {},
"outputs": [],
Expand All @@ -403,7 +431,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 16,
"id": "2d3a0d3a-da1c-41ec-b16c-f281c46ad794",
"metadata": {},
"outputs": [],
Expand All @@ -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",
Expand All @@ -441,7 +478,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 18,
"id": "e7c16557-af76-4e70-83d9-2984e19a9554",
"metadata": {},
"outputs": [],
Expand All @@ -452,7 +489,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 19,
"id": "2a82ea22-9694-4c65-b72f-c89ae49d1ab2",
"metadata": {},
"outputs": [],
Expand All @@ -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",
Expand Down Expand Up @@ -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('.')"
]
Expand Down
2 changes: 1 addition & 1 deletion templates/simple_rag/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,4 @@
}
},
"_files": {}
}
}

0 comments on commit 7cde03f

Please sign in to comment.