Skip to content

Commit 95c361c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent a477f52 commit 95c361c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/llm/txt2kg_rag.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ def parse_args():
142142
'--skip_graph_rag', action="store_true",
143143
help="Skip the graph RAG step. "
144144
"Used to compare the performance of Vector+Graph RAG vs Vector RAG.")
145-
parser.add_argument(
146-
'--omit_text_graph', action="store_true",
147-
help="Omit the text graph from the LLM Input.")
145+
parser.add_argument('--omit_text_graph', action="store_true",
146+
help="Omit the text graph from the LLM Input.")
148147
args = parser.parse_args()
149148

150149
assert args.NV_NIM_KEY, "NVIDIA API key is required for TXT2KG and eval"
@@ -405,8 +404,8 @@ def make_dataset(args):
405404
topk=5, # nodes
406405
topk_e=5, # edges
407406
cost_e=.5, # edge cost
408-
num_clusters=10, # num clusters
409-
with_text_graph= not args.omit_text_graph) # option to omit text graph
407+
num_clusters=10, # num clusters
408+
with_text_graph=not args.omit_text_graph) # option to omit text graph
410409

411410
# number of neighbors for each seed node selected by KNN
412411
fanout = 100

torch_geometric/utils/rag/backend_utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ class to use. Defaults to LocalFeatureStore.
368368
def make_pcst_filter(triples: List[Tuple[str, str,
369369
str]], model: SentenceTransformer,
370370
topk: int = 5, topk_e: int = 5, cost_e: float = 0.5,
371-
num_clusters: int = 1, with_text_graph: bool = True) -> None:
371+
num_clusters: int = 1,
372+
with_text_graph: bool = True) -> None:
372373
"""Creates a PCST (Prize Collecting Tree) filter.
373374
374375
:param triples: List of triples (head, relation, tail) representing knowledge graph data

0 commit comments

Comments
 (0)