-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Various minor updates #1932
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
Various minor updates #1932
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2d04ae8
Add text unit ids to Community model
natoverse 3a2e0d7
Add graph utilities
natoverse 9ef9c3b
Turn off LCC for clustering by default
natoverse ec460d6
Simplify embeddings config/flow
natoverse 709454b
Semver
natoverse c32a631
Merge branch 'main' into various-minor-updates
natoverse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "type": "patch", | ||
| "description": "A few fixes and enhancements for better reuse and flow." | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Copyright (c) 2024 Microsoft Corporation. | ||
| # Licensed under the MIT License | ||
|
|
||
| """A module containing get_embedding_settings.""" | ||
|
|
||
| from graphrag.config.models.graph_rag_config import GraphRagConfig | ||
|
|
||
|
|
||
| def get_embedding_settings( | ||
| settings: GraphRagConfig, | ||
| vector_store_params: dict | None = None, | ||
| ) -> dict: | ||
| """Transform GraphRAG config into settings for workflows.""" | ||
| # TEMP | ||
| embeddings_llm_settings = settings.get_language_model_config( | ||
| settings.embed_text.model_id | ||
| ) | ||
| vector_store_settings = settings.get_vector_store_config( | ||
| settings.embed_text.vector_store_id | ||
| ).model_dump() | ||
|
|
||
| # | ||
| # If we get to this point, settings.vector_store is defined, and there's a specific setting for this embedding. | ||
| # settings.vector_store.base contains connection information, or may be undefined | ||
| # settings.vector_store.<vector_name> contains the specific settings for this embedding | ||
| # | ||
| strategy = settings.embed_text.resolved_strategy( | ||
| embeddings_llm_settings | ||
| ) # get the default strategy | ||
| strategy.update({ | ||
| "vector_store": { | ||
| **(vector_store_params or {}), | ||
| **(vector_store_settings), | ||
| } | ||
| }) # update the default strategy with the vector store settings | ||
| # This ensures the vector store config is part of the strategy and not the global config | ||
| return { | ||
| "strategy": strategy, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.