Skip to content

Commit 4e5ac17

Browse files
committed
remove onlyrag in txt2kg
1 parent 99aff66 commit 4e5ac17

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

test/datasets/test_protein_mpnn_dataset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from torch_geometric.datasets import ProteinMPNNDataset
2-
from torch_geometric.testing import onlyOnline, withPackage
2+
from torch_geometric.testing import onlyLinux, onlyOnline, withPackage
33

44

5+
@onlyLinux
56
@onlyOnline
67
@withPackage('pandas')
78
def test_protein_mpnn_dataset():

test/llm/models/test_txt2kg.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
_multiproc_helper,
1414
_parse_n_check_triples,
1515
)
16-
from torch_geometric.testing import onlyRAG
1716

1817
# ────────────────────────
1918
# Fixtures
@@ -105,7 +104,6 @@ def fake_llm(txt, **kwargs):
105104
# ────────────────────────
106105

107106

108-
@onlyRAG
109107
def test_txt2kg_cloud_mode(mock_cloud_llm):
110108
kg = TXT2KG(NVIDIA_API_KEY="fake-key", local_LM=False)
111109
kg.add_doc_2_KG("Paris is the capital of France.")
@@ -124,7 +122,6 @@ def test_txt2kg_local_mode(mock_local_llm):
124122
assert triples == []
125123

126124

127-
@onlyRAG
128125
def test_txt2kg_with_qa_pair(mock_cloud_llm):
129126
kg = TXT2KG(NVIDIA_API_KEY="fake", local_LM=False)
130127
qa = ("What is Paris?", "Capital of France")
@@ -134,7 +131,6 @@ def test_txt2kg_with_qa_pair(mock_cloud_llm):
134131
assert kg.relevant_triples[qa] == []
135132

136133

137-
@onlyRAG
138134
def test_txt2kg_duplicate_qa_warning(capfd, mock_cloud_llm):
139135
kg = TXT2KG(NVIDIA_API_KEY="fake", local_LM=False)
140136
qa = ("Q", "A")
@@ -145,7 +141,6 @@ def test_txt2kg_duplicate_qa_warning(capfd, mock_cloud_llm):
145141
assert "Warning: QA_Pair was already added" in captured.out
146142

147143

148-
@onlyRAG
149144
def test_txt2kg_save_kg(mock_cloud_llm):
150145
kg = TXT2KG(NVIDIA_API_KEY="fake", local_LM=False)
151146
kg.add_doc_2_KG("Test document.")

test/llm/utils/test_rag_backend_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
preprocess_triplet,
1414
retrieval_via_pcst,
1515
)
16+
from torch_geometric.testing import onlyLinux
1617

1718

1819
def test_preprocess_triplet():
@@ -62,6 +63,7 @@ def create_mock_data(num_nodes=3, num_edges=2):
6263
edge_idx=edge_idx), textual_nodes, textual_edges
6364

6465

66+
@onlyLinux
6567
def test_empty_graph():
6668
import pandas as pd
6769

@@ -115,6 +117,7 @@ def create_mock_graph_and_triples():
115117
return triples, graph
116118

117119

120+
@onlyLinux
118121
def test_apply_retrieval_via_pcst_isolated_node():
119122
triples, graph = create_mock_graph_and_triples()
120123
model = MockSentenceTransformer()

0 commit comments

Comments
 (0)