Allow user to provide customized collection_name #2016
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The collection name is constructed with
f"{container_name}-{embedding_name}".replace(".", "-")
But embedding_name is picked from one of:
https://github.com/microsoft/graphrag/blob/1da138061501aa4f8065d2e8783193e2cbe920b1/graphrag/config/embeddings.py#L6C1-L14C1
So for
text_unit_text_embedding
scenario, a collection name liketest_text_unit_text
will be generated (test
is the container_name from config yaml). But in some cases, a user needs a full customized name e.g.test
.Related Issues
[Reference any related issues or tasks that this pull request addresses.]
Proposed Changes
Don't generated the collection_name if users provide one.
Checklist
Additional Notes
[Add any additional notes or context that may be helpful for the reviewer(s).]