You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was following this doc to set up SUQL and trying to get the entry point example working. I was able to create the table in psql and run the 2 servers, but got this error while running the entry point:
Error executing SQL query: table "temp_table_71x0scb5r0gk" does not exist
The query runs fine without the "WHERE answer(...) ..." part.
I got log in the embedding server:
[2024-11-03 18:14:34,081] ERROR in app: Exception on /search [POST]
Traceback (most recent call last):
File "/home/fuhuxiao/.pyenv/versions/3.9.0/lib/python3.9/site-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/home/fuhuxiao/.pyenv/versions/3.9.0/lib/python3.9/site-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/fuhuxiao/.pyenv/versions/3.9.0/lib/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/home/fuhuxiao/.pyenv/versions/3.9.0/lib/python3.9/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/fuhuxiao/.pyenv/versions/3.9.0/lib/python3.9/site-packages/suql/faiss_embedding.py", line 548, in search
user="select_user",
File "/home/fuhuxiao/.pyenv/versions/3.9.0/lib/python3.9/site-packages/suql/faiss_embedding.py", line 537, in dot_product
primary_key_field_name="_id",
File "/home/fuhuxiao/.pyenv/versions/3.9.0/lib/python3.9/site-packages/suql/faiss_embedding.py", line 493, in _dot_product
free_text_field_table,
File "/home/fuhuxiao/.pyenv/versions/3.9.0/lib/python3.9/site-packages/suql/faiss_embedding.py", line 296, in dot_product
TypeError: __init__() missing 1 required positional argument: 'indices'
With some more digging, I think the issue is in suql/faiss_embedding.py, line 297.
In the library code, commenting out
sel = faiss.IDSelectorBatch(embedding_indices)
and removing params=faiss.SearchParametersIVF(sel=sel) from self.embeddings.search function call made the error go away and the entry point running.
I checked the definition of IDSelectorBatch in faiss repo- it is a python wrapper for a C++ class, but I see both usages (init with an array and init with a size and an array).
Exact query that triggered this issue:
suql = "SELECT * FROM restaurants WHERE answer(reviews, 'Is this good?') = 'Yes';"
I was following this doc to set up SUQL and trying to get the entry point example working. I was able to create the table in psql and run the 2 servers, but got this error while running the entry point:
The query runs fine without the "WHERE answer(...) ..." part.
I got log in the embedding server:
With some more digging, I think the issue is in
suql/faiss_embedding.py
, line 297.In the library code, commenting out
and removing
params=faiss.SearchParametersIVF(sel=sel)
fromself.embeddings.search
function call made the error go away and the entry point running.I checked the definition of
IDSelectorBatch
in faiss repo- it is a python wrapper for a C++ class, but I see both usages (init with an array and init with a size and an array).Exact query that triggered this issue:
suql = "SELECT * FROM restaurants WHERE answer(reviews, 'Is this good?') = 'Yes';"
SUQL version:
1.1.6
Python version:
3.9.0
Database dump:
tmp.sql.txt
The text was updated successfully, but these errors were encountered: