pyg-nightly 2.7.0.dev20250120__py3-none-any.whl → 2.7.0.dev20250122__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {pyg_nightly-2.7.0.dev20250120.dist-info → pyg_nightly-2.7.0.dev20250122.dist-info}/METADATA +1 -1
- {pyg_nightly-2.7.0.dev20250120.dist-info → pyg_nightly-2.7.0.dev20250122.dist-info}/RECORD +7 -7
- torch_geometric/__init__.py +1 -1
- torch_geometric/metrics/__init__.py +2 -0
- torch_geometric/metrics/link_pred.py +10 -2
- torch_geometric/nn/nlp/llm.py +2 -2
- {pyg_nightly-2.7.0.dev20250120.dist-info → pyg_nightly-2.7.0.dev20250122.dist-info}/WHEEL +0 -0
{pyg_nightly-2.7.0.dev20250120.dist-info → pyg_nightly-2.7.0.dev20250122.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: pyg-nightly
|
3
|
-
Version: 2.7.0.
|
3
|
+
Version: 2.7.0.dev20250122
|
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=6uAYPnzs2ioPbhZa8-9MVViVgklvCD1v_1Vc8B9t3zI,1904
|
2
2
|
torch_geometric/_compile.py,sha256=f-WQeH4VLi5Hn9lrgztFUCSrN_FImjhQa6BxFzcYC38,1338
|
3
3
|
torch_geometric/_onnx.py,sha256=V9ffrIKSqhDw6xUZ12lkuSfNs48cQp2EeJ6Z19GfnVw,349
|
4
4
|
torch_geometric/backend.py,sha256=lVaf7aLoVaB3M-UcByUJ1G4T4FOK6LXAg0CF4W3E8jo,1575
|
@@ -287,8 +287,8 @@ torch_geometric/loader/shadow.py,sha256=_hCspYf9SlJYX0lqEjxFec9e9t1iMScNThOoWR1w
|
|
287
287
|
torch_geometric/loader/temporal_dataloader.py,sha256=AQ2QFeiXKbPp6I8sUeE8H7br-1_yndivXt7Z6_w62zI,2248
|
288
288
|
torch_geometric/loader/utils.py,sha256=f27mczQ7fEP2HpTsJGJxKS0slPu0j8zTba3jP8ViNck,14901
|
289
289
|
torch_geometric/loader/zip_loader.py,sha256=3lt10fD15Rxm1WhWzypswGzCEwUz4h8OLCD1nE15yNg,3843
|
290
|
-
torch_geometric/metrics/__init__.py,sha256=
|
291
|
-
torch_geometric/metrics/link_pred.py,sha256=
|
290
|
+
torch_geometric/metrics/__init__.py,sha256=Ck-rqQOGoKYRNSI95zlsTtQKVN4ZJGDaYYTMeSOjvvU,435
|
291
|
+
torch_geometric/metrics/link_pred.py,sha256=dEsKVrjJ3OYnDbeDxowMNTCQMjKdgj-Xsh0L2VY5hLo,18563
|
292
292
|
torch_geometric/nn/__init__.py,sha256=RrWRzEoqtR3lsO2lAzYXboLPb3uYEX2z3tLxiBIVWjc,847
|
293
293
|
torch_geometric/nn/data_parallel.py,sha256=lDAxRi83UNuzAQSj3eu9K2sQheOIU6wqR5elS6oDs90,4764
|
294
294
|
torch_geometric/nn/encoding.py,sha256=QNjwWczYExZ1wRGBmpuqYbn6tB7NC4BU-DEgzjhcZqw,3115
|
@@ -459,7 +459,7 @@ torch_geometric/nn/models/signed_gcn.py,sha256=J40CnedFIqtKI1LhW1ITSEFRbA_XiJZL6
|
|
459
459
|
torch_geometric/nn/models/tgn.py,sha256=kEGdfLJybkbMT4UMoAh2nCzfX3_nDjfm1cicuPHEwAM,11878
|
460
460
|
torch_geometric/nn/models/visnet.py,sha256=97OFMCsPDEI5BCSi7RhoRcU2CNRp7zck2tEzrltFZj4,43192
|
461
461
|
torch_geometric/nn/nlp/__init__.py,sha256=q6CPUiJHcc9bXw90lyj-ID4F3kfW8uPM-SOxW9uCMHs,213
|
462
|
-
torch_geometric/nn/nlp/llm.py,sha256=
|
462
|
+
torch_geometric/nn/nlp/llm.py,sha256=j03tyCO1ADgrzGhLqYOUcsy0haGbV4dmT9bdwEnESPE,12181
|
463
463
|
torch_geometric/nn/nlp/sentence_transformer.py,sha256=q5M7SGtrUzoSiNhKCGFb7JatWiukdhNF6zdq2yiqxwE,4475
|
464
464
|
torch_geometric/nn/nlp/vision_transformer.py,sha256=diVBefjIynzYs8WBlcpTeSVnw1PUecHY--B9Yd-W2hA,863
|
465
465
|
torch_geometric/nn/norm/__init__.py,sha256=u2qIDrkbeuObGVXSAIftAlvSd6ouGTtxznCfD-59UiA,669
|
@@ -629,6 +629,6 @@ torch_geometric/utils/undirected.py,sha256=H_nfpI0_WluOG6VfjPyldvcjL4w5USAKWu2x5
|
|
629
629
|
torch_geometric/visualization/__init__.py,sha256=PyR_4K5SafsJrBr6qWrkjKr6GBL1b7FtZybyXCDEVwY,154
|
630
630
|
torch_geometric/visualization/graph.py,sha256=ZuLPL92yGRi7lxlqsUPwL_EVVXF7P2kMcveTtW79vpA,4784
|
631
631
|
torch_geometric/visualization/influence.py,sha256=CWMvuNA_Nf1sfbJmQgn58yS4OFpeKXeZPe7kEuvkUBw,477
|
632
|
-
pyg_nightly-2.7.0.
|
633
|
-
pyg_nightly-2.7.0.
|
634
|
-
pyg_nightly-2.7.0.
|
632
|
+
pyg_nightly-2.7.0.dev20250122.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
633
|
+
pyg_nightly-2.7.0.dev20250122.dist-info/METADATA,sha256=JOKsGMFgqMMCa0rxpsjhLPD5bqoJ1lXrzBALYWKHWYk,62977
|
634
|
+
pyg_nightly-2.7.0.dev20250122.dist-info/RECORD,,
|
torch_geometric/__init__.py
CHANGED
@@ -30,7 +30,7 @@ from .lazy_loader import LazyLoader
|
|
30
30
|
contrib = LazyLoader('contrib', globals(), 'torch_geometric.contrib')
|
31
31
|
graphgym = LazyLoader('graphgym', globals(), 'torch_geometric.graphgym')
|
32
32
|
|
33
|
-
__version__ = '2.7.0.
|
33
|
+
__version__ = '2.7.0.dev20250122'
|
34
34
|
|
35
35
|
__all__ = [
|
36
36
|
'Index',
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# flake8: noqa
|
2
2
|
|
3
3
|
from .link_pred import (
|
4
|
+
LinkPredMetric,
|
4
5
|
LinkPredMetricCollection,
|
5
6
|
LinkPredPrecision,
|
6
7
|
LinkPredRecall,
|
@@ -11,6 +12,7 @@ from .link_pred import (
|
|
11
12
|
)
|
12
13
|
|
13
14
|
link_pred_metrics = [
|
15
|
+
'LinkPredMetric',
|
14
16
|
'LinkPredMetricCollection',
|
15
17
|
'LinkPredPrecision',
|
16
18
|
'LinkPredRecall',
|
@@ -30,6 +30,14 @@ class LinkPredMetricData:
|
|
30
30
|
if hasattr(self, '_pred_rel_mat'):
|
31
31
|
return self._pred_rel_mat # type: ignore
|
32
32
|
|
33
|
+
if self.edge_label_index[1].numel() == 0:
|
34
|
+
self._pred_rel_mat = torch.zeros_like(
|
35
|
+
self.pred_index_mat,
|
36
|
+
dtype=torch.bool if self.edge_label_weight is None else
|
37
|
+
torch.get_default_dtype(),
|
38
|
+
)
|
39
|
+
return self._pred_rel_mat
|
40
|
+
|
33
41
|
# Flatten both prediction and ground-truth indices, and determine
|
34
42
|
# overlaps afterwards via `torch.searchsorted`.
|
35
43
|
max_index = max( # type: ignore
|
@@ -139,7 +147,7 @@ class LinkPredMetric(BaseMetric):
|
|
139
147
|
is_differentiable: bool = False
|
140
148
|
full_state_update: bool = False
|
141
149
|
higher_is_better: Optional[bool] = None
|
142
|
-
weighted: bool
|
150
|
+
weighted: bool
|
143
151
|
|
144
152
|
def __init__(self, k: int) -> None:
|
145
153
|
super().__init__()
|
@@ -484,7 +492,7 @@ class LinkPredNDCG(LinkPredMetric):
|
|
484
492
|
self.discount,
|
485
493
|
self.discount.new_full((1, ), fill_value=float('inf')),
|
486
494
|
])
|
487
|
-
discount = discount[pos.clamp(max=self.k
|
495
|
+
discount = discount[pos.clamp(max=self.k)]
|
488
496
|
|
489
497
|
idcg = scatter( # Apply discount and aggregate:
|
490
498
|
data.edge_label_weight / discount,
|
torch_geometric/nn/nlp/llm.py
CHANGED
File without changes
|