Skip to content

Commit

Permalink
typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
riship committed Jan 10, 2025
1 parent 0999e53 commit 6b74594
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions torch_geometric/utils/rag/backend_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,12 @@ def make_pcst_filter(triples: List[Tuple[str, str, str]],
model: SentenceTransformer):
if DataFrame is None:
raise Exception("PCST requires `pip install pandas`")
all_nodes = []
for triple in triples:
if triple[0] in all_nodes:
all_nodes.append(triple[0])
if triple[2] in all_nodes:
all_nodes.append(triple[2])
full_textual_nodes = all_nodes
nodes = []
for h, r, t in triples:
for node in (h, t):
if node not in nodes:
nodes.append(node)
full_textual_nodes = nodes

def apply_retrieval_via_pcst(
graph: Data,
Expand Down

0 comments on commit 6b74594

Please sign in to comment.