pyg-nightly 2.7.0.dev20251008__py3-none-any.whl → 2.8.0.dev20251124__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyg_nightly-2.7.0.dev20251008.dist-info → pyg_nightly-2.8.0.dev20251124.dist-info}/METADATA +1 -1
- {pyg_nightly-2.7.0.dev20251008.dist-info → pyg_nightly-2.8.0.dev20251124.dist-info}/RECORD +14 -14
- torch_geometric/__init__.py +1 -1
- torch_geometric/datasets/tag_dataset.py +28 -20
- torch_geometric/llm/models/sentence_transformer.py +13 -0
- torch_geometric/llm/utils/backend_utils.py +2 -1
- torch_geometric/llm/utils/vectorrag.py +2 -1
- torch_geometric/nn/conv/cugraph/gat_conv.py +8 -2
- torch_geometric/nn/conv/cugraph/rgcn_conv.py +3 -0
- torch_geometric/nn/conv/cugraph/sage_conv.py +3 -0
- torch_geometric/nn/model_hub.py +2 -15
- torch_geometric/nn/pool/cluster_pool.py +1 -2
- {pyg_nightly-2.7.0.dev20251008.dist-info → pyg_nightly-2.8.0.dev20251124.dist-info}/WHEEL +0 -0
- {pyg_nightly-2.7.0.dev20251008.dist-info → pyg_nightly-2.8.0.dev20251124.dist-info}/licenses/LICENSE +0 -0
{pyg_nightly-2.7.0.dev20251008.dist-info → pyg_nightly-2.8.0.dev20251124.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyg-nightly
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.8.0.dev20251124
|
|
4
4
|
Summary: Graph Neural Network Library for PyTorch
|
|
5
5
|
Keywords: deep-learning,pytorch,geometric-deep-learning,graph-neural-networks,graph-convolutional-networks
|
|
6
6
|
Author-email: Matthias Fey <matthias@pyg.org>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
torch_geometric/__init__.py,sha256=
|
|
1
|
+
torch_geometric/__init__.py,sha256=aY1pU-eCTEljl3jizH5K9dsuVlUbq4mmUeavVQrulRw,2292
|
|
2
2
|
torch_geometric/_compile.py,sha256=9yqMTBKatZPr40WavJz9FjNi7pQj8YZAZOyZmmRGXgc,1351
|
|
3
3
|
torch_geometric/_onnx.py,sha256=ODB_8cwFUiwBUjngXn6-K5HHb7IDul7DDXuuGX7vj_0,8178
|
|
4
4
|
torch_geometric/backend.py,sha256=lVaf7aLoVaB3M-UcByUJ1G4T4FOK6LXAg0CF4W3E8jo,1575
|
|
@@ -151,7 +151,7 @@ torch_geometric/datasets/shapenet.py,sha256=tn3HiQQAr6lxHrqxfOVaAtl40guwFYTXWCbS
|
|
|
151
151
|
torch_geometric/datasets/shrec2016.py,sha256=cTLhctbqE0EUEvKddJFhPzDb1oLKXOth4O_WzsWtyMk,6323
|
|
152
152
|
torch_geometric/datasets/snap_dataset.py,sha256=deJvB6cpIQ3bu_pcWoqgEo1-Kl_NcFi7ZSUci645X0U,9481
|
|
153
153
|
torch_geometric/datasets/suite_sparse.py,sha256=eqjH4vAUq872qdk3YdLkZSwlu6r7HHpTgK0vEVGmY1s,3278
|
|
154
|
-
torch_geometric/datasets/tag_dataset.py,sha256=
|
|
154
|
+
torch_geometric/datasets/tag_dataset.py,sha256=TwZMDxnFGjl4vPosZIp1mmqMXjxcMt3WcgeiTeKMjuU,19788
|
|
155
155
|
torch_geometric/datasets/taobao.py,sha256=CUcZpbWsNTasevflO8zqP0YvENy89P7wpKS4MHaDJ6Q,4170
|
|
156
156
|
torch_geometric/datasets/teeth3ds.py,sha256=hZvhcq9lsQENNFr5hk50w2T3CgxE_tlnQfrCgN6uIDQ,9919
|
|
157
157
|
torch_geometric/datasets/tosca.py,sha256=nUSF8NQT1GlkwWQLshjWmr8xORsvRHzzIqhUyDCvABc,4632
|
|
@@ -278,14 +278,14 @@ torch_geometric/llm/models/llm.py,sha256=039mq9rZBZMyZW5rYj0fMP5kl9RJAI7N-oJyC4M
|
|
|
278
278
|
torch_geometric/llm/models/llm_judge.py,sha256=qhc8hmIPNhcfLVRyBVk7jQW7ncoIb9QYw7rcsGAIpyg,6457
|
|
279
279
|
torch_geometric/llm/models/molecule_gpt.py,sha256=RWoP4RMsoRzZtuedPCLNCfooqibCqxkuAhH-pyek9No,7641
|
|
280
280
|
torch_geometric/llm/models/protein_mpnn.py,sha256=SwTgafSbI2KJ-yqzn0trZtVWLmfo0_kPEaWSNJUCt70,12266
|
|
281
|
-
torch_geometric/llm/models/sentence_transformer.py,sha256=
|
|
281
|
+
torch_geometric/llm/models/sentence_transformer.py,sha256=XYDN7xYyMqUNZyxpY6EjDjfYt1mope5iGsBZ2fLc1J8,7041
|
|
282
282
|
torch_geometric/llm/models/txt2kg.py,sha256=CjWXCa_WrqIlBfOSPMAK-mnaX19dvH_YhXMWSuLkk4o,14074
|
|
283
283
|
torch_geometric/llm/models/vision_transformer.py,sha256=aPuVfpSwGR96KaicRYut49g6ShrCklbouaLwyPuwhBQ,1022
|
|
284
284
|
torch_geometric/llm/utils/__init__.py,sha256=P5By_n15MqkUU1tfh87PGE--J7RVygPeDSBOTy_VlZ0,292
|
|
285
|
-
torch_geometric/llm/utils/backend_utils.py,sha256=
|
|
285
|
+
torch_geometric/llm/utils/backend_utils.py,sha256=vde10npVYZTY6ONExu-eeMgzouMnhdFcoTe8GyYuL1k,15874
|
|
286
286
|
torch_geometric/llm/utils/feature_store.py,sha256=d60n3TlclEhlqoDEHKmvvGI6t8r0nur1BNwXyqqtj24,5903
|
|
287
287
|
torch_geometric/llm/utils/graph_store.py,sha256=_Hh0aGnokUn0zvOC80xUfT4TtX_7G4KIDoEBkNXkgHY,7103
|
|
288
|
-
torch_geometric/llm/utils/vectorrag.py,sha256=
|
|
288
|
+
torch_geometric/llm/utils/vectorrag.py,sha256=7WE73NOzHfChSvmYEfg2dHp8JIgLtX4XaKVRrsKmkc0,4791
|
|
289
289
|
torch_geometric/loader/__init__.py,sha256=w9LSTbyrLRkyrLXi_10d80csWgfKOKDRQDJXRdcfD0M,1835
|
|
290
290
|
torch_geometric/loader/base.py,sha256=ataIwNEYL0px3CN3LJEgXIVTRylDHB6-yBFXXuX2JN0,1615
|
|
291
291
|
torch_geometric/loader/cache.py,sha256=S65heO3YTyUPbttqizCNtKPHIoAw5iHRpbvw6KlXmok,2106
|
|
@@ -319,7 +319,7 @@ torch_geometric/nn/fx.py,sha256=PDtaHJAgodh4xf8FNl4fVxPGZJDbRaq3Q9z8qb1DNNI,1606
|
|
|
319
319
|
torch_geometric/nn/glob.py,sha256=MdHjcUlHmFmTevzwND1_x7dXXJPzIDTBJRGOrGdZ8dQ,1088
|
|
320
320
|
torch_geometric/nn/inits.py,sha256=_8FqacCLPz5Ft2zB5s6dtKGTKWtfrLyCLLuv1QvyKjk,2457
|
|
321
321
|
torch_geometric/nn/lr_scheduler.py,sha256=_FWdIgGPDSZCK1TZFWHSP5RfpY83Kyhlz7Ja6YHPQVo,8937
|
|
322
|
-
torch_geometric/nn/model_hub.py,sha256=
|
|
322
|
+
torch_geometric/nn/model_hub.py,sha256=GxgKE9P7wwEHp7dG_pnLI562WGHXIuHkOWD3kUzkX-g,8827
|
|
323
323
|
torch_geometric/nn/module_dict.py,sha256=c6ThkEfju01ZyhERA8rZgr9oawVfwqOBMrdG3bzSsro,2377
|
|
324
324
|
torch_geometric/nn/parameter_dict.py,sha256=RJnid_I8jXTjIoDKVr0Ej2E2XKOLxH_lXxLeEHB_wUg,2412
|
|
325
325
|
torch_geometric/nn/reshape.py,sha256=WJvc_oPPcfsFqN97i4oJRMor17ar5IPeIu8BevKIyIk,426
|
|
@@ -424,9 +424,9 @@ torch_geometric/nn/conv/wl_conv_continuous.py,sha256=nnfd5JVAR2UYz6AQxwCN2a8C6RX
|
|
|
424
424
|
torch_geometric/nn/conv/x_conv.py,sha256=c_qnD-o9-qMa-vaOgEDGb5ZT1NdhS2vrhTQdp-8cYIo,6013
|
|
425
425
|
torch_geometric/nn/conv/cugraph/__init__.py,sha256=Z1neZpdSe95MyMB9Zt_ll2mj4ogEecQpkSxS0rq63x4,251
|
|
426
426
|
torch_geometric/nn/conv/cugraph/base.py,sha256=zt0vbZ6ANqbVjgWNxcLfQSlSVDOn1qK7wzeZ2uB2sMk,6351
|
|
427
|
-
torch_geometric/nn/conv/cugraph/gat_conv.py,sha256=
|
|
428
|
-
torch_geometric/nn/conv/cugraph/rgcn_conv.py,sha256=
|
|
429
|
-
torch_geometric/nn/conv/cugraph/sage_conv.py,sha256=
|
|
427
|
+
torch_geometric/nn/conv/cugraph/gat_conv.py,sha256=f78t9i_4BHkRDrnZtXiaDCUrnFYX07EuehZvLdZg2rY,3160
|
|
428
|
+
torch_geometric/nn/conv/cugraph/rgcn_conv.py,sha256=2vqNiw9GyRktn42JVj_oco0frgTGfEZltCz1sg9f3eE,4161
|
|
429
|
+
torch_geometric/nn/conv/cugraph/sage_conv.py,sha256=2W2CtyvSBNztpLjLhsU8DnPyXxwfMZJlGktADHphskw,2989
|
|
430
430
|
torch_geometric/nn/conv/utils/__init__.py,sha256=VWVDyQQu2mP-O3lzP-TEJUSeyhLizTiAb5rMLsUrUzA,852
|
|
431
431
|
torch_geometric/nn/conv/utils/cheatsheet.py,sha256=-AzSVc5icHfWIw9UxYX8ea_1dziC4v4st_KDwwUeV1A,2792
|
|
432
432
|
torch_geometric/nn/dense/__init__.py,sha256=_t9aKRZmNqRPneW9edJ4Hh7hGHU9DaPpqf9g55GQJsk,847
|
|
@@ -499,7 +499,7 @@ torch_geometric/nn/pool/__init__.py,sha256=VU9cPdLC-MPgt1kfS0ZwehfSD3g0V30VQuR1W
|
|
|
499
499
|
torch_geometric/nn/pool/approx_knn.py,sha256=n7C8Cbar6o5tJcuAbzhM5hqMK26hW8dm5DopuocidO0,3967
|
|
500
500
|
torch_geometric/nn/pool/asap.py,sha256=p8fwpMOeCUyJrdvMmLoTMzr0tI9YCTnefMx8ylIv5xE,6683
|
|
501
501
|
torch_geometric/nn/pool/avg_pool.py,sha256=pwiQh14BCVsT-iULqVAFW-Dxt7DjFOu8CQX_Hu34vZc,3966
|
|
502
|
-
torch_geometric/nn/pool/cluster_pool.py,sha256=
|
|
502
|
+
torch_geometric/nn/pool/cluster_pool.py,sha256=57UNpThRvLumY0159T8nBhxXvZE0mT5YMoCyrpoRmtk,5247
|
|
503
503
|
torch_geometric/nn/pool/consecutive.py,sha256=7dMiMd5IybNeml1RqZq436FI6sod5ZUxTuDWJjr5syo,273
|
|
504
504
|
torch_geometric/nn/pool/decimation.py,sha256=AjbU2h_Gl_EQcfkhF977EnrLJ2kait_e4HyCNKRyxPw,1601
|
|
505
505
|
torch_geometric/nn/pool/edge_pool.py,sha256=cXgcN5xF8z5NeycYMX9m1zoAk1jtSdyK42YiNNHTeow,8571
|
|
@@ -654,7 +654,7 @@ torch_geometric/utils/undirected.py,sha256=H_nfpI0_WluOG6VfjPyldvcjL4w5USAKWu2x5
|
|
|
654
654
|
torch_geometric/visualization/__init__.py,sha256=b-HnVesXjyJ_L1N-DnjiRiRVf7lhwKaBQF_2i5YMVSU,208
|
|
655
655
|
torch_geometric/visualization/graph.py,sha256=mfZHXYfiU-CWMtfawYc80IxVwVmtK9hbIkSKhM_j7oI,14311
|
|
656
656
|
torch_geometric/visualization/influence.py,sha256=CWMvuNA_Nf1sfbJmQgn58yS4OFpeKXeZPe7kEuvkUBw,477
|
|
657
|
-
pyg_nightly-2.
|
|
658
|
-
pyg_nightly-2.
|
|
659
|
-
pyg_nightly-2.
|
|
660
|
-
pyg_nightly-2.
|
|
657
|
+
pyg_nightly-2.8.0.dev20251124.dist-info/licenses/LICENSE,sha256=ic-27cMJc1kWoMEYncz3Ya3Ur2Bi3bNLWib2DT763-o,1067
|
|
658
|
+
pyg_nightly-2.8.0.dev20251124.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
659
|
+
pyg_nightly-2.8.0.dev20251124.dist-info/METADATA,sha256=8O-Cslu9xIWBaT2C0oeVek100Acxa7FjCVFfT1IH3g0,63680
|
|
660
|
+
pyg_nightly-2.8.0.dev20251124.dist-info/RECORD,,
|
torch_geometric/__init__.py
CHANGED
|
@@ -31,7 +31,7 @@ from .lazy_loader import LazyLoader
|
|
|
31
31
|
contrib = LazyLoader('contrib', globals(), 'torch_geometric.contrib')
|
|
32
32
|
graphgym = LazyLoader('graphgym', globals(), 'torch_geometric.graphgym')
|
|
33
33
|
|
|
34
|
-
__version__ = '2.
|
|
34
|
+
__version__ = '2.8.0.dev20251124'
|
|
35
35
|
|
|
36
36
|
__all__ = [
|
|
37
37
|
'Index',
|
|
@@ -137,10 +137,13 @@ class TAGDataset(InMemoryDataset):
|
|
|
137
137
|
self.token_on_disk = token_on_disk
|
|
138
138
|
self.tokenize_batch_size = tokenize_batch_size
|
|
139
139
|
self._token = self.tokenize_graph(self.tokenize_batch_size)
|
|
140
|
-
self._llm_explanation_token =
|
|
141
|
-
|
|
142
|
-
self.
|
|
143
|
-
|
|
140
|
+
self._llm_explanation_token: Dict[str, Tensor] = {}
|
|
141
|
+
self._all_token: Dict[str, Tensor] = {}
|
|
142
|
+
if self.name in self.llm_explanation_id:
|
|
143
|
+
self._llm_explanation_token = self.tokenize_graph(
|
|
144
|
+
self.tokenize_batch_size, text_type='llm_explanation')
|
|
145
|
+
self._all_token = self.tokenize_graph(self.tokenize_batch_size,
|
|
146
|
+
text_type='all')
|
|
144
147
|
self.__num_classes__ = dataset.num_classes
|
|
145
148
|
|
|
146
149
|
@property
|
|
@@ -170,14 +173,16 @@ class TAGDataset(InMemoryDataset):
|
|
|
170
173
|
|
|
171
174
|
@property
|
|
172
175
|
def llm_explanation_token(self) -> Dict[str, Tensor]:
|
|
173
|
-
if self._llm_explanation_token is None
|
|
176
|
+
if self._llm_explanation_token is None and \
|
|
177
|
+
self.name in self.llm_explanation_id:
|
|
174
178
|
self._llm_explanation_token = self.tokenize_graph(
|
|
175
179
|
text_type='llm_explanation')
|
|
176
180
|
return self._llm_explanation_token
|
|
177
181
|
|
|
178
182
|
@property
|
|
179
183
|
def all_token(self) -> Dict[str, Tensor]:
|
|
180
|
-
if self._all_token is None
|
|
184
|
+
if self._all_token is None and \
|
|
185
|
+
self.name in self.llm_explanation_id:
|
|
181
186
|
self._all_token = self.tokenize_graph(text_type='all')
|
|
182
187
|
return self._all_token
|
|
183
188
|
|
|
@@ -230,13 +235,15 @@ class TAGDataset(InMemoryDataset):
|
|
|
230
235
|
filename='node-text.csv.gz',
|
|
231
236
|
log=True)
|
|
232
237
|
self.text = list(read_csv(raw_text_path)['text'])
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
if self.name in self.llm_explanation_id:
|
|
239
|
+
print('downloading llm explanations')
|
|
240
|
+
llm_explanation_path = download_google_url(
|
|
241
|
+
id=self.llm_explanation_id[self.name],
|
|
242
|
+
folder=f'{self.root}/raw', filename='node-gpt-response.csv.gz',
|
|
243
|
+
log=True)
|
|
244
|
+
self.llm_explanation = list(read_csv(llm_explanation_path)['text'])
|
|
245
|
+
print('downloading llm predictions')
|
|
246
|
+
fs.cp(f'{self.llm_prediction_url}/{self.name}.csv', self.raw_dir)
|
|
240
247
|
|
|
241
248
|
def process(self) -> None:
|
|
242
249
|
# process Title and Abstraction
|
|
@@ -276,6 +283,14 @@ class TAGDataset(InMemoryDataset):
|
|
|
276
283
|
for i, pred in enumerate(preds):
|
|
277
284
|
pl[i][:len(pred)] = torch.tensor(
|
|
278
285
|
pred[:self.llm_prediction_topk], dtype=torch.long) + 1
|
|
286
|
+
|
|
287
|
+
if self.llm_explanation is None or pl is None:
|
|
288
|
+
raise ValueError(
|
|
289
|
+
"The TAGDataset only have ogbn-arxiv LLM explanations"
|
|
290
|
+
"and predictions in default. The llm explanation and"
|
|
291
|
+
"prediction of each node is not specified.Please pass in"
|
|
292
|
+
"'llm_explanation' and 'llm_prediction' when"
|
|
293
|
+
"convert your dataset to Text Attribute Graph Dataset")
|
|
279
294
|
elif self.name in self.llm_explanation_id:
|
|
280
295
|
self.download()
|
|
281
296
|
else:
|
|
@@ -283,13 +298,6 @@ class TAGDataset(InMemoryDataset):
|
|
|
283
298
|
'The dataset is not ogbn-arxiv,'
|
|
284
299
|
'please pass in your llm explanation list to `llm_explanation`'
|
|
285
300
|
'and llm prediction list to `llm_prediction`')
|
|
286
|
-
if self.llm_explanation is None or pl is None:
|
|
287
|
-
raise ValueError(
|
|
288
|
-
"The TAGDataset only have ogbn-arxiv LLM explanations"
|
|
289
|
-
"and predictions in default. The llm explanation and"
|
|
290
|
-
"prediction of each node is not specified."
|
|
291
|
-
"Please pass in 'llm_explanation' and 'llm_prediction' when"
|
|
292
|
-
"convert your dataset to Text Attribute Graph Dataset")
|
|
293
301
|
|
|
294
302
|
def save_node_text(self, text: List[str]) -> None:
|
|
295
303
|
node_text_path = osp.join(self.root, 'raw', 'node-text.csv.gz')
|
|
@@ -112,6 +112,19 @@ class SentenceTransformer(torch.nn.Module):
|
|
|
112
112
|
output_device: Optional[Union[torch.device, str]] = None,
|
|
113
113
|
verbose=False,
|
|
114
114
|
) -> Tensor:
|
|
115
|
+
r"""Main function for users. Converts strings to embeddings.
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
text (List[str]): List of strings to embed.
|
|
119
|
+
batch_size (int, optional): How many strings to process.
|
|
120
|
+
Defaults to processing all at once, but this may lead to
|
|
121
|
+
OOM errors. (default: obj:`None`)
|
|
122
|
+
output_device (Union[torch.device, str], optional):
|
|
123
|
+
By default outputs cpu pytorch tensor, but can choose
|
|
124
|
+
to output to specific cuda devices. (default: obj:`None`)
|
|
125
|
+
verbose (bool, optional): Controls the verbosity of outputs.
|
|
126
|
+
(default: obj:`False`)
|
|
127
|
+
"""
|
|
115
128
|
is_empty = len(text) == 0
|
|
116
129
|
text = ['dummy'] if is_empty else text
|
|
117
130
|
|
|
@@ -408,7 +408,8 @@ def make_pcst_filter(triples: List[Tuple[str, str,
|
|
|
408
408
|
:return: Retrieved graph/query data
|
|
409
409
|
"""
|
|
410
410
|
# PCST relies on numpy and pcst_fast pypi libs, hence to("cpu")
|
|
411
|
-
|
|
411
|
+
with torch.no_grad():
|
|
412
|
+
q_emb = model.encode([query]).to("cpu")
|
|
412
413
|
textual_nodes = [(int(i), full_textual_nodes[i])
|
|
413
414
|
for i in graph["node_idx"]]
|
|
414
415
|
textual_nodes = DataFrame(textual_nodes,
|
|
@@ -65,7 +65,8 @@ class DocumentRetriever(VectorRetriever):
|
|
|
65
65
|
List[str]: Documents retrieved from the vector database.
|
|
66
66
|
"""
|
|
67
67
|
if isinstance(query, str):
|
|
68
|
-
|
|
68
|
+
with torch.no_grad():
|
|
69
|
+
query_enc = self.encoder(query, **self.model_kwargs)
|
|
69
70
|
else:
|
|
70
71
|
query_enc = query
|
|
71
72
|
|
|
@@ -26,6 +26,9 @@ class CuGraphGATConv(CuGraphModule): # pragma: no cover
|
|
|
26
26
|
:class:`~torch_geometric.nn.conv.GATConv` based on the :obj:`cugraph-ops`
|
|
27
27
|
package that fuses message passing computation for accelerated execution
|
|
28
28
|
and lower memory footprint.
|
|
29
|
+
The current method to enable :obj:`cugraph-ops`
|
|
30
|
+
is to use `The NVIDIA PyG Container
|
|
31
|
+
<https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pyg>`_.
|
|
29
32
|
"""
|
|
30
33
|
def __init__(
|
|
31
34
|
self,
|
|
@@ -67,6 +70,7 @@ class CuGraphGATConv(CuGraphModule): # pragma: no cover
|
|
|
67
70
|
self,
|
|
68
71
|
x: Tensor,
|
|
69
72
|
edge_index: EdgeIndex,
|
|
73
|
+
edge_attr: Tensor,
|
|
70
74
|
max_num_neighbors: Optional[int] = None,
|
|
71
75
|
) -> Tensor:
|
|
72
76
|
graph = self.get_cugraph(edge_index, max_num_neighbors)
|
|
@@ -75,10 +79,12 @@ class CuGraphGATConv(CuGraphModule): # pragma: no cover
|
|
|
75
79
|
|
|
76
80
|
if LEGACY_MODE:
|
|
77
81
|
out = GATConvAgg(x, self.att, graph, self.heads, 'LeakyReLU',
|
|
78
|
-
self.negative_slope, False, self.concat
|
|
82
|
+
self.negative_slope, False, self.concat,
|
|
83
|
+
edge_feat=edge_attr)
|
|
79
84
|
else:
|
|
80
85
|
out = GATConvAgg(x, self.att, graph, self.heads, 'LeakyReLU',
|
|
81
|
-
self.negative_slope, self.concat
|
|
86
|
+
self.negative_slope, self.concat,
|
|
87
|
+
edge_feat=edge_attr)
|
|
82
88
|
|
|
83
89
|
if self.bias is not None:
|
|
84
90
|
out = out + self.bias
|
|
@@ -29,6 +29,9 @@ class CuGraphRGCNConv(CuGraphModule): # pragma: no cover
|
|
|
29
29
|
:class:`~torch_geometric.nn.conv.RGCNConv` based on the :obj:`cugraph-ops`
|
|
30
30
|
package that fuses message passing computation for accelerated execution
|
|
31
31
|
and lower memory footprint.
|
|
32
|
+
The current method to enable :obj:`cugraph-ops`
|
|
33
|
+
is to use `The NVIDIA PyG Container
|
|
34
|
+
<https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pyg>`_.
|
|
32
35
|
"""
|
|
33
36
|
def __init__(self, in_channels: int, out_channels: int, num_relations: int,
|
|
34
37
|
num_bases: Optional[int] = None, aggr: str = 'mean',
|
|
@@ -27,6 +27,9 @@ class CuGraphSAGEConv(CuGraphModule): # pragma: no cover
|
|
|
27
27
|
:class:`~torch_geometric.nn.conv.SAGEConv` based on the :obj:`cugraph-ops`
|
|
28
28
|
package that fuses message passing computation for accelerated execution
|
|
29
29
|
and lower memory footprint.
|
|
30
|
+
The current method to enable :obj:`cugraph-ops`
|
|
31
|
+
is to use `The NVIDIA PyG Container
|
|
32
|
+
<https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pyg>`_.
|
|
30
33
|
"""
|
|
31
34
|
def __init__(
|
|
32
35
|
self,
|
torch_geometric/nn/model_hub.py
CHANGED
|
@@ -144,10 +144,10 @@ class PyGModelHubMixin(ModelHubMixin):
|
|
|
144
144
|
revision,
|
|
145
145
|
cache_dir,
|
|
146
146
|
force_download,
|
|
147
|
-
proxies,
|
|
148
|
-
resume_download,
|
|
149
147
|
local_files_only,
|
|
150
148
|
token,
|
|
149
|
+
proxies=None,
|
|
150
|
+
resume_download=False,
|
|
151
151
|
dataset_name='',
|
|
152
152
|
model_name='',
|
|
153
153
|
map_location='cpu',
|
|
@@ -165,8 +165,6 @@ class PyGModelHubMixin(ModelHubMixin):
|
|
|
165
165
|
revision=revision,
|
|
166
166
|
cache_dir=cache_dir,
|
|
167
167
|
force_download=force_download,
|
|
168
|
-
proxies=proxies,
|
|
169
|
-
resume_download=resume_download,
|
|
170
168
|
token=token,
|
|
171
169
|
local_files_only=local_files_only,
|
|
172
170
|
)
|
|
@@ -188,8 +186,6 @@ class PyGModelHubMixin(ModelHubMixin):
|
|
|
188
186
|
cls,
|
|
189
187
|
pretrained_model_name_or_path: str,
|
|
190
188
|
force_download: bool = False,
|
|
191
|
-
resume_download: bool = False,
|
|
192
|
-
proxies: Optional[Dict] = None,
|
|
193
189
|
token: Optional[Union[str, bool]] = None,
|
|
194
190
|
cache_dir: Optional[str] = None,
|
|
195
191
|
local_files_only: bool = False,
|
|
@@ -215,13 +211,6 @@ class PyGModelHubMixin(ModelHubMixin):
|
|
|
215
211
|
(re-)download of the model weights and configuration files,
|
|
216
212
|
overriding the cached versions if they exist.
|
|
217
213
|
(default: :obj:`False`)
|
|
218
|
-
resume_download (bool, optional): Whether to delete incompletely
|
|
219
|
-
received files. Will attempt to resume the download if such a
|
|
220
|
-
file exists. (default: :obj:`False`)
|
|
221
|
-
proxies (Dict[str, str], optional): A dictionary of proxy servers
|
|
222
|
-
to use by protocol or endpoint, *e.g.*,
|
|
223
|
-
:obj:`{'http': 'foo.bar:3128', 'http://host': 'foo.bar:4012'}`.
|
|
224
|
-
The proxies are used on each request. (default: :obj:`None`)
|
|
225
214
|
token (str or bool, optional): The token to use as HTTP bearer
|
|
226
215
|
authorization for remote files. If set to :obj:`True`, will use
|
|
227
216
|
the token generated when running :obj:`transformers-cli login`
|
|
@@ -239,8 +228,6 @@ class PyGModelHubMixin(ModelHubMixin):
|
|
|
239
228
|
return super().from_pretrained(
|
|
240
229
|
pretrained_model_name_or_path,
|
|
241
230
|
force_download=force_download,
|
|
242
|
-
resume_download=resume_download,
|
|
243
|
-
proxies=proxies,
|
|
244
231
|
use_auth_token=token,
|
|
245
232
|
cache_dir=cache_dir,
|
|
246
233
|
local_files_only=local_files_only,
|
|
@@ -20,8 +20,7 @@ class UnpoolInfo(NamedTuple):
|
|
|
20
20
|
|
|
21
21
|
class ClusterPooling(torch.nn.Module):
|
|
22
22
|
r"""The cluster pooling operator from the `"Edge-Based Graph Component
|
|
23
|
-
Pooling" <
|
|
24
|
-
|
|
23
|
+
Pooling" <https://arxiv.org/abs/2409.11856>`_ paper.
|
|
25
24
|
:class:`ClusterPooling` computes a score for each edge.
|
|
26
25
|
Based on the selected edges, graph clusters are calculated and compressed
|
|
27
26
|
to one node using the injective :obj:`"sum"` aggregation function.
|
|
File without changes
|
{pyg_nightly-2.7.0.dev20251008.dist-info → pyg_nightly-2.8.0.dev20251124.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|