-
Notifications
You must be signed in to change notification settings - Fork 389
Description
Another question regarding https://milvus.io/docs/full_text_search_with_milvus.md
from pymilvus.model.hybrid import BGEM3EmbeddingFunctionThis code runs fine, but in my Pycharm, it always displays 'hybrid' and 'BGEM3EmbeddingFunction' unavailable. I searched the libraries, and found:
ls venv/lib/python3.10/site-packages/milvus_model/hybrid/ __init__.py __pycache__ bge_m3.py mgte.py ls venv/lib/python3.10/site-packages/pymilvus/model/__init__.py venv/lib/python3.10/site-packages/pymilvus/model/__init__.pySo the module is actually defined and exported under "milvus_model/hybrid/init.py ", not "pymilvus/model/init.py", so I changed the import to:
from milvus_model.hybrid import BGEM3EmbeddingFunctionThe tutorial results work exactly the same as "from pymilvus.model.hybrid import BGEM3EmbeddingFunction". But the change gets rid of the import error message in PyCharm. Is this good?
@codingjaguar can help on answering this question
Originally posted by @xiaofan-luan in milvus-io/milvus#36226 (reply in thread)