mirror of
https://github.com/microsoft/graphrag.git
synced 2025-06-26 23:19:58 +00:00
Fix text unit incremental ID updates (#1734)
* Increment text_unit ids during incremental * Semver
This commit is contained in:
parent
a932b2d342
commit
faa05b691f
@ -0,0 +1,4 @@
|
||||
{
|
||||
"type": "patch",
|
||||
"description": "Properly increment text unit IDs during updates."
|
||||
}
|
@ -301,6 +301,10 @@ def _update_and_merge_text_units(
|
||||
lambda x: [entity_id_mapping.get(i, i) for i in x] if x is not None else x
|
||||
)
|
||||
|
||||
initial_id = old_text_units["human_readable_id"].max() + 1
|
||||
delta_text_units["human_readable_id"] = np.arange(
|
||||
initial_id, initial_id + len(delta_text_units)
|
||||
)
|
||||
# Merge the final text units
|
||||
return pd.concat([old_text_units, delta_text_units], ignore_index=True, copy=False)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user