Skip to content

Commit 3d79de9

Browse files
Raise error on empty deltas for incremental indexing (#1375)
* Raise error on empty deltas for incremental indexing * Format
1 parent 1661672 commit 3d79de9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "patch",
3+
"description": "Raise error on empty deltas for inc indexing"
4+
}

graphrag/index/run/run.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ async def run_pipeline_with_config(
133133
if is_update_run and update_index_storage:
134134
delta_dataset = await get_delta_docs(dataset, storage)
135135

136+
# Fail on empty delta dataset
137+
if delta_dataset.new_inputs.empty:
138+
error_msg = "Incremental Indexing Error: No new documents to process."
139+
raise ValueError(error_msg)
140+
136141
delta_storage = update_index_storage.child("delta")
137142

138143
# Run the pipeline on the new documents

0 commit comments

Comments
 (0)