Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWarning: Did not recognize type 'vector' of column 'embedding' #98

Open
avelino opened this issue Feb 15, 2024 · 2 comments
Open

AWarning: Did not recognize type 'vector' of column 'embedding' #98

avelino opened this issue Feb 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@avelino
Copy link
Member

avelino commented Feb 15, 2024

/Users/avelino/projects/avelino/talkd/dialog/src/dialog/models/__init__.py:34: SAWarning: Did not recognize type 'vector' of column 'embedding'
  __table__ = Table("contents", metadata, autoload_with=engine)
Traceback (most recent call last):
  File "/Users/avelino/projects/avelino/talkd/dialog/.venv/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3790, in get_loc
    return self._engine.get_loc(casted_key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "index.pyx", line 152, in pandas._libs.index.IndexEngine.get_loc
  File "index.pyx", line 181, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 7080, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'primary_key'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/avelino/projects/avelino/talkd/dialog/src/load_csv.py", line 65, in <module>
    load_csv_and_generate_embeddings(args.path)
  File "/Users/avelino/projects/avelino/talkd/dialog/src/load_csv.py", line 44, in load_csv_and_generate_embeddings
    new_keys = set(df["primary_key"]) - set(df_in_db["primary_key"])
                                            ~~~~~~~~^^^^^^^^^^^^^^^
  File "/Users/avelino/projects/avelino/talkd/dialog/.venv/lib/python3.11/site-packages/pandas/core/frame.py", line 3893, in __getitem__
    indexer = self.columns.get_loc(key)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/avelino/projects/avelino/talkd/dialog/.venv/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3797, in get_loc
    raise KeyError(key) from err
KeyError: 'primary_key'
@avelino avelino added the bug Something isn't working label Feb 15, 2024
@vmesel
Copy link
Member

vmesel commented Feb 16, 2024

@avelino have you ran the migrations?

@avelino
Copy link
Member Author

avelino commented Feb 17, 2024

have you ran the migrations?

@vmesel yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants