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 built a custom model and I'm trying to query iris with it, with dot product on embeddings, but I get the following error, traceback:
similarity_search_with_score_by_vector
self.distance_strategy(embedding).label("distance")
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/User/path/venv/lib/python3.12/site-packages/langchain_iris/vectorstores.py", line 194, in distance_strategy
return self.table.c.embedding.DOT_product
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/User/path/venv/lib/python3.12/site-packages/sqlalchemy/sql/elements.py", line 1498, in __getattr__
raise AttributeError(
AttributeError: Neither 'Column' object nor 'comparator_factory' object has an attribute 'DOT_product'
Another small thing: I cannot import DistanceStrategy from vectorstores.py in order to use the same object, instead of hardcoding the string in my code.
If I use cosine distance, it works like a charm.
The text was updated successfully, but these errors were encountered:
Hi,
I built a custom model and I'm trying to query iris with it, with dot product on embeddings, but I get the following error, traceback:
My custom model that I defined:
How I call it:
Another small thing: I cannot import DistanceStrategy from vectorstores.py in order to use the same object, instead of hardcoding the string in my code.
If I use cosine distance, it works like a charm.
The text was updated successfully, but these errors were encountered: