Skip to content

Support num_partitions to decide no of partition other then default #51

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

Merged
merged 7 commits into from
Jun 3, 2025

Conversation

rgupta2508
Copy link
Contributor

Give an option to select no of partition while creating collection.

@zc277584121
Copy link
Collaborator

@rgupta2508 it seems some small lint issues

@rgupta2508
Copy link
Contributor Author

@rgupta2508 it seems some small lint issues

Resolved

@zc277584121
Copy link
Collaborator

@rgupta2508 seems still having lint issue

@rgupta2508
Copy link
Contributor Author

I think there is something missing in this library build or milvus field reference, it is saying langchain_milvus/vectorstores/milvus.py:663: error: "Milvus" has no attribute "num_partitions" [attr-defined]
but it is supported in milvus in , and partation_key field we are giving in schema .
not sure how to resolve this?

@zc277584121
Copy link
Collaborator

@rgupta2508 maybe you missed the self.num_partitions = num_partitions

@zc277584121
Copy link
Collaborator

zc277584121 commented Apr 17, 2025

btw, why its type is str(I guess it should be int), and what is your expected end2end behavior when invoking this paramerter

@rgupta2508
Copy link
Contributor Author

btw, why its type is str(I guess it should be int), and what is your expected end2end behavior when invoking this paramerter

@zc277584121 if we will enable partition key , it will create 64 partition by default for that column, i want to to control number of partition by this parameter.
https://milvus.io/docs/use-partition-key.md

@zc277584121
Copy link
Collaborator

i guess the lint issue is that you forgot to assign self.num_partitions = num_partitions

@zc277584121
Copy link
Collaborator

@rgupta2508 Just a reminder, you can run lint and test follow the contribution guide in your local enviroment to check before commit PR

@rgupta2508
Copy link
Contributor Author

@rgupta2508 Just a reminder, you can run lint and test follow the contribution guide in your local enviroment to check before commit PR

Ok Thanks,
I have setup this environment in my local environemnt

@rgupta2508
Copy link
Contributor Author

@zc277584121 can you please review this,
Sorry for delayed on this

@zc277584121
Copy link
Collaborator

/lgtm

@zc277584121 zc277584121 merged commit bd27808 into langchain-ai:main Jun 3, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants