Update logging in retriever.py for version 4.5.1: Modify edge count logging to utilize the adjacency list instead of the non-existent .edges attribute in the subgraph, enhancing accuracy in debug statements related to graph retrieval processes.
This commit is contained in:
parent
3e27c72b80
commit
47fdcf8eed
|
|
@ -509,7 +509,10 @@ def hybrid_retrieve(req: QueryRequest) -> QueryResponse:
|
|||
# top_k wird erst hier final angewandt
|
||||
# WP-24c v4.5.0-DEBUG: Retrieval-Tracer - Vor finaler Hit-Erstellung
|
||||
if subgraph:
|
||||
logger.debug(f"📊 [GRAPH] Subgraph enthält {len(subgraph.edges)} Kanten für {len(seed_ids)} Seed-Notizen")
|
||||
# WP-24c v4.5.1: Subgraph hat kein .edges Attribut, sondern .adj (Adjazenzliste)
|
||||
# Zähle alle Kanten aus der Adjazenzliste
|
||||
edge_count = sum(len(edges) for edges in subgraph.adj.values()) if hasattr(subgraph, 'adj') else 0
|
||||
logger.debug(f"📊 [GRAPH] Subgraph enthält {edge_count} Kanten für {len(seed_ids)} Seed-Notizen")
|
||||
else:
|
||||
logger.debug(f"📊 [GRAPH] Kein Subgraph (depth=0 oder keine Seed-IDs)")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user