Skip to content

Commit

Permalink
community[patch], mongodb[patch]: Stop spamming SIMD import warnings (l…
Browse files Browse the repository at this point in the history
…angchain-ai#19531)

If you use an embedding dist function in an eval loop, you get warned
every time. Would prefer to just check once and forget about it.

---------

Co-authored-by: Bagatur <[email protected]>
  • Loading branch information
hinthornw and baskaryan authored Mar 28, 2024
1 parent b04e663 commit b7b62e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/community/langchain_community/utils/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def cosine_similarity(X: Matrix, Y: Matrix) -> np.ndarray:
return np.array([Z])
return np.array(Z)
except ImportError:
logger.info(
logger.debug(
"Unable to import simsimd, defaulting to NumPy implementation. If you want "
"to use simsimd please install with `pip install simsimd`."
)
Expand Down
2 changes: 1 addition & 1 deletion libs/partners/mongodb/langchain_mongodb/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def cosine_similarity(X: Matrix, Y: Matrix) -> np.ndarray:
return np.array([Z])
return np.array(Z)
except ImportError:
logger.info(
logger.debug(
"Unable to import simsimd, defaulting to NumPy implementation. If you want "
"to use simsimd please install with `pip install simsimd`."
)
Expand Down

0 comments on commit b7b62e2

Please sign in to comment.