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

pymilvus import error message in PyCharm for milvus_model #2562

Open
codingjaguar opened this issue Jan 14, 2025 · 5 comments
Open

pymilvus import error message in PyCharm for milvus_model #2562

codingjaguar opened this issue Jan 14, 2025 · 5 comments
Assignees

Comments

@codingjaguar
Copy link
Contributor

Another question regarding https://milvus.io/docs/full_text_search_with_milvus.md

from pymilvus.model.hybrid import BGEM3EmbeddingFunction

This 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__.py

So 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 BGEM3EmbeddingFunction

The 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)

@XuanYang-cn
Copy link
Contributor

/assign @junjiejiangjjj

@sre-ci-robot
Copy link

@XuanYang-cn: GitHub didn't allow me to assign the following users: junjiejiangjjj.

Note that only milvus-io members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @junjiejiangjjj

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codingjaguar
Copy link
Contributor Author

@junjiejiangjjj is this fixed already?

@junjiejiangjjj
Copy link
Contributor

@junjiejiangjjj is this fixed already?

milvus-model related code has been modified, but the pymilvus code has not been fixed yet.

@zhuwenxing
Copy link
Contributor

/assign @junjiejiangjjj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants