Skip to content

Commit

Permalink
Merge branch 'main' into config-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dworthen committed Jan 9, 2025
2 parents f77f730 + 37fd7a7 commit 7744fac
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 8 deletions.
14 changes: 14 additions & 0 deletions .semversioner/1.1.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"changes": [
{
"description": "Fix a bug on creating community hierarchy for dynamic search",
"type": "patch"
},
{
"description": "Increase LOCAL_SEARCH_COMMUNITY_PROP to 15%",
"type": "patch"
}
],
"created_at": "2025-01-08T21:53:16+00:00",
"version": "1.1.1"
}
4 changes: 4 additions & 0 deletions .semversioner/next-release/minor-20250109193320338859.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "minor",
"description": "small bug fix"
}
4 changes: 0 additions & 4 deletions .semversioner/next-release/patch-20250107205718575866.json

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
Note: version releases in the 0.x.y range may introduce breaking changes.

## 1.1.1

- patch: Fix a bug on creating community hierarchy for dynamic search
- patch: Increase LOCAL_SEARCH_COMMUNITY_PROP to 15%

## 1.1.0

- minor: Make gleanings independent of encoding
Expand Down
2 changes: 1 addition & 1 deletion graphrag/cli/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def run_basic_search(
dataframe_dict = _resolve_output_files(
config=config,
output_list=[
"create_final_text_units.parquet",
"create_final_text_units",
],
)
final_text_units: pd.DataFrame = dataframe_dict["create_final_text_units"]
Expand Down
8 changes: 6 additions & 2 deletions graphrag/query/context_builder/dynamic_community_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,22 @@ def __init__(
self.reports = {report.community_id: report for report in community_reports}
# mapping from community to sub communities
self.node2children = {
community.id: (
community.short_id: (
[]
if community.sub_community_ids is None
else community.sub_community_ids
else [str(x) for x in community.sub_community_ids]
)
for community in communities
if community.short_id is not None
}

# mapping from community to parent community
self.node2parent: dict[str, str] = {
sub_community: community
for community, sub_communities in self.node2children.items()
for sub_community in sub_communities
}

# mapping from level to communities
self.levels: dict[str, list[str]] = {}

Expand Down Expand Up @@ -182,5 +185,6 @@ async def select(self, query: str) -> tuple[list[CommunityReport], dict[str, Any
llm_info["prompt_tokens"],
llm_info["output_tokens"],
)

llm_info["ratings"] = ratings
return community_reports, llm_info
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "graphrag"
# Maintainers: do not change the version here manually, use ./scripts/release.sh
version = "1.1.0"
version = "1.1.1"
description = "GraphRAG: A graph-based retrieval-augmented generation (RAG) system."
authors = [
"Alonso Guevara Fernández <[email protected]>",
Expand Down

0 comments on commit 7744fac

Please sign in to comment.