mirror of
https://github.com/microsoft/graphrag.git
synced 2026-01-14 09:07:20 +08:00
Fix seed init in clustering (#1156)
This commit is contained in:
parent
594084f156
commit
10910797d0
@ -0,0 +1,4 @@
|
||||
{
|
||||
"type": "patch",
|
||||
"description": "Fix seed hardcoded init"
|
||||
}
|
||||
@ -71,6 +71,9 @@ def cluster_graph(
|
||||
|
||||
num_total = len(output_df)
|
||||
|
||||
# Create a seed for this run (if not provided)
|
||||
seed = strategy.get("seed", Random().randint(0, 0xFFFFFFFF)) # noqa S311
|
||||
|
||||
# Go through each of the rows
|
||||
graph_level_pairs_column: list[list[tuple[int, str]]] = []
|
||||
for _, row in progress_iterable(
|
||||
@ -87,7 +90,7 @@ def cluster_graph(
|
||||
cast(str, row[column]),
|
||||
cast(Communities, row[community_map_to]),
|
||||
level,
|
||||
seed=strategy.get("seed"),
|
||||
seed=seed,
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user