-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
milvus: add array data type for collection create #23219
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Fixing build issue also, numpy-1.24.* not supported in python 3.12 (https://pypi.org/project/numpy/1.24.0/) so build is failing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will send to milvus team but not sure we want this. some issues:
we should try to maintain python 3.12 support if possible. I believe you can do this by adding a numpy dep of
numpy = [
{version = "^1.24.0", python = "<3.12"},
{version = "^1.26.0", python = ">=3.12"}
]
and on the array type - it looks like it hard-codes it as a list of varchar, which might not always be the case.
Hi @rgupta2508 did you considered using the Give me your feedback on this. |
Resolved conflict. can you @zc277584121 please review this . if we can do anything on this |
@zc277584121 ping |
fields.append( | ||
FieldSchema(key, DataType.VARCHAR, max_length=65_535) | ||
) | ||
elif dtype == DataType.ARRAY: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to still rely on the solution of the pymilvus problem. It seems that pymilvus needs to support return DataType.ARRAY and other informations, before this line of code can take effect milvus-io/pymilvus#2144
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition, could you please add the corresponding unit test as the guarantee to the quality of other possible future PRs
@rgupta2508 Thank you for you contribution. However, this feature still depends on the resolution of the pymilvus issue, which may not be a high priority for them. @efriis If you have to close this PR because of refactor of pydanit_v2, just close it or draft it. |
closing! Let's move discussion of the above to an issue to get a plan in place before further coding. @zc277584121 if pymilvus isn't managed by you could you tag in one of your teammates who does? |
Hi @zc277584121 , there are lot if usecase where we are using array datatype in milvus. We as, WALMART team trying to embed data of some question answer which is tagged with multiple entities , just to filter using those entity we need array data type. there are some other use cases where we need filter of data. for example stackoverflow question answer can be tagged with "java", "microservices" ,"api", "rest" or some other tag. just to filter embedding data using one tag, this array data type is very useful . For now we have developed custom implementation for array data type using langchain. but cant able to upgrade langchian-milvus untill this feature is available . we have some more idea and use case in langchain_milvus but cant add untill this is merged . |
@rgupta2508 Thanks for your feedback |
@rgupta2508 Could you please give me the permission of your repo, so that I can append a commit with some code to your branch |
Done |
@rgupta2508 thanks, I have appended a commit on the top of this branch, including some code refinement and unit test. |
Signed-off-by: ChengZi <[email protected]>
803d2f4
to
63387b1
Compare
@efriis LGTM, but it is currently just a workaround to support the scenario. Now it supports array type if the user customizes the information passed into the array field. |
@zc277584121 Thanks for consideration , Changes are looks good to me. |
Found and fix a small issue: #25836 |
Add array data type for milvus vector store collection create
Thank you for contributing to LangChain!
PR title: "package: description"
PR message: Delete this entire checklist and replace with
Add tests and docs: If you're adding a new integration, please include
docs/docs/integrations
directory.Lint and test: Run
make format
,make lint
andmake test
from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/Additional guidelines:
If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.