Skip to content

Commit ffec466

Browse files
committed
Merge branch 'master' into cov/llm/vit
2 parents b143673 + 44dee49 commit ffec466

File tree

8 files changed

+16
-216
lines changed

8 files changed

+16
-216
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ repos:
3535
args: [-d, '{extends: default, rules: {line-length: disable, document-start: disable, truthy: {level: error}, braces: {max-spaces-inside: 1}}}']
3636

3737
- repo: https://github.com/asottile/pyupgrade
38-
rev: v3.21.0
38+
rev: v3.21.2
3939
hooks:
4040
- id: pyupgrade
4141
name: Upgrade Python syntax
@@ -75,7 +75,7 @@ repos:
7575
additional_dependencies: [Flake8-pyproject]
7676

7777
- repo: https://github.com/astral-sh/ruff-pre-commit
78-
rev: v0.14.3
78+
rev: v0.14.7
7979
hooks:
8080
- id: ruff
8181
name: Ruff formatting
@@ -92,7 +92,7 @@ repos:
9292
- mdformat_footnote
9393

9494
- repo: https://github.com/sphinx-contrib/sphinx-lint
95-
rev: v1.0.1
95+
rev: v1.0.2
9696
hooks:
9797
- id: sphinx-lint
9898
name: Check Sphinx

examples/llm/nvtx_examples/README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/llm/nvtx_examples/nvtx_rag_backend_example.py

Lines changed: 0 additions & 144 deletions
This file was deleted.

examples/llm/nvtx_examples/nvtx_run.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/llm/nvtx_examples/nvtx_webqsp_example.py

Lines changed: 0 additions & 22 deletions
This file was deleted.

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ filterwarnings = [
208208
"error::DeprecationWarning",
209209
# TODO(rishipuri98): Remove usage of `torch_geometric.distributed` from `torch_geometric.llm`
210210
"ignore:.*torch_geometric.distributed.*:DeprecationWarning",
211+
# Filter `torch.jit.*` deprication warnings:
212+
"ignore:.*torch.jit.*:DeprecationWarning",
211213
]
212214
markers = [
213215
"rag: mark test as RAG test",

test/llm/test_large_graph_indexer.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@
1414
TripletLike,
1515
get_features_for_triplets,
1616
)
17+
from torch_geometric.llm.utils.backend_utils import preprocess_triplet
1718
from torch_geometric.typing import WITH_PT20
1819

1920
# create possible nodes and edges for graph
2021
strkeys = string.ascii_letters + string.digits
21-
NODE_POOL = list({"".join(random.sample(strkeys, 10)) for i in range(1000)})
22-
EDGE_POOL = list({"".join(random.sample(strkeys, 10)) for i in range(50)})
22+
NODE_POOL = list(
23+
{"".join(random.sample(strkeys, 10)).lower()
24+
for i in range(1000)})
25+
EDGE_POOL = list(
26+
{"".join(random.sample(strkeys, 10)).lower()
27+
for i in range(50)})
2328

2429

2530
def featurize(s: str) -> int:
@@ -35,11 +40,6 @@ def sample_triplets(amount: int = 1) -> List[TripletLike]:
3540
return trips
3641

3742

38-
def preprocess_triplet(triplet: TripletLike) -> TripletLike:
39-
h, r, t = triplet
40-
return h.lower(), r, t.lower()
41-
42-
4343
def test_basic_collate():
4444
graphs = [sample_triplets(1000) for i in range(2)]
4545

torch_geometric/datasets/web_qsp_dataset.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@
1515
get_features_for_triplets_groups,
1616
)
1717
from torch_geometric.llm.models import SentenceTransformer
18-
from torch_geometric.llm.utils.backend_utils import retrieval_via_pcst
19-
20-
21-
def preprocess_triplet(triplet: TripletLike) -> TripletLike:
22-
h, r, t = triplet
23-
return str(h).lower(), str(r).lower(), str(t).lower()
18+
from torch_geometric.llm.utils.backend_utils import (
19+
preprocess_triplet,
20+
retrieval_via_pcst,
21+
)
2422

2523

2624
class KGQABaseDataset(InMemoryDataset):

0 commit comments

Comments
 (0)