From ad34395d0b5fde63f0505d68ad952e96d4e785e0 Mon Sep 17 00:00:00 2001 From: ronchengang Date: Thu, 10 Oct 2024 12:20:02 +0800 Subject: [PATCH] update output path logic since GraphRAG has changed the storage config value in the latest release (#374) bump:patch Co-authored-by: Chen, Ron Gang --- libs/ktem/ktem/index/file/graph/pipelines.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/libs/ktem/ktem/index/file/graph/pipelines.py b/libs/ktem/ktem/index/file/graph/pipelines.py index c20b36a..9c1952b 100644 --- a/libs/ktem/ktem/index/file/graph/pipelines.py +++ b/libs/ktem/ktem/index/file/graph/pipelines.py @@ -177,15 +177,8 @@ class GraphRAGRetrieverPipeline(BaseFileIndexRetriever): root_path, _ = prepare_graph_index_path(graph_id) output_path = root_path / "output" - child_paths = sorted( - list(output_path.iterdir()), key=lambda x: x.stem, reverse=True - ) - # get the latest child path - assert child_paths, "GraphRAG index output not found" - latest_child_path = Path(child_paths[0]) / "artifacts" - - INPUT_DIR = latest_child_path + INPUT_DIR = output_path LANCEDB_URI = str(INPUT_DIR / "lancedb") COMMUNITY_REPORT_TABLE = "create_final_community_reports" ENTITY_TABLE = "create_final_nodes"