pyg-nightly 2.7.0.dev20250520__py3-none-any.whl → 2.7.0.dev20250522__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.
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyg-nightly
3
- Version: 2.7.0.dev20250520
3
+ Version: 2.7.0.dev20250522
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>
7
7
  Requires-Python: >=3.9
8
8
  Description-Content-Type: text/markdown
9
+ License-Expression: MIT
9
10
  Classifier: Development Status :: 5 - Production/Stable
10
- Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Programming Language :: Python
12
12
  Classifier: Programming Language :: Python :: 3.9
13
13
  Classifier: Programming Language :: Python :: 3.10
@@ -1,4 +1,4 @@
1
- torch_geometric/__init__.py,sha256=xd2IismTH8UX4k_m8sziBHGZeCcwt-4mEvP5dnA5a1Y,2255
1
+ torch_geometric/__init__.py,sha256=V9z6mgNHh9c3ijrbVM5X54XAb8-8klwgprglA5SNMgM,2255
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
@@ -20,7 +20,7 @@ torch_geometric/resolver.py,sha256=fn-_6mCpI2xv7eDZnIFcYrHOn0IrwbkWFLDb9laQrWI,1
20
20
  torch_geometric/seed.py,sha256=MJLbVwpb9i8mK3oi32sS__Cq-dRq_afTeoOL_HoA9ko,372
21
21
  torch_geometric/template.py,sha256=rqjDWgcSAgTCiV4bkOjWRPaO4PpUdC_RXigzxxBqAu8,1060
22
22
  torch_geometric/typing.py,sha256=Ryx6oGoOsEh8rJ3O0O6j8O18ZPHkrIv-7dr-suQZa6Q,15486
23
- torch_geometric/warnings.py,sha256=t114CbkrmiqkXaavx5g7OO52dLdktf-U__B5QqYIQvI,413
23
+ torch_geometric/warnings.py,sha256=SB9dWGovX_KKcxqsOrdTDvSb_j0NoB5vPGnK2vg0jVw,727
24
24
  torch_geometric/contrib/__init__.py,sha256=0pWkmXfZtbdr-AKwlii5LTFggTEH-MCrSKpZxrtPlVs,352
25
25
  torch_geometric/contrib/datasets/__init__.py,sha256=lrGnWsEiJf5zsBRmshGZZFN_uYR2ezDjbj9n9nCpvtk,23
26
26
  torch_geometric/contrib/explain/__init__.py,sha256=Rs1y07BI6K8J2rmEw6eyrW6QW8y3faaSb3vzWMCoUac,396
@@ -114,7 +114,7 @@ torch_geometric/datasets/lastfm_asia.py,sha256=y9F34KoWsYKVIoKNCb2_ZulBseZaBAwfD
114
114
  torch_geometric/datasets/linkx_dataset.py,sha256=_DsF5d2-o79-WibEKojIJKCpCF3VVxSDbHLWrnCirTE,6907
115
115
  torch_geometric/datasets/lrgb.py,sha256=lOlzYCn9XbwQb3HK_wdufqjqK_aZbnoUqZu0NXZ6Oyw,11657
116
116
  torch_geometric/datasets/malnet_tiny.py,sha256=E_ymC7_XS8rgZelcdevZyCDVjX5Ov21G6vwrG0JgAP0,5271
117
- torch_geometric/datasets/md17.py,sha256=BD6LU2xm6_ycXVk6r4O0poNt5Sr_PJ2P1QjNqIOLDHY,16734
117
+ torch_geometric/datasets/md17.py,sha256=Wv-Q75uUDrFjRur5nOvg2TSw68UxkdYDJvkf3YA-T70,16735
118
118
  torch_geometric/datasets/mixhop_synthetic_dataset.py,sha256=4NNvTHUvvV6pcqQCyVDS5XhppXUeF2H9GTfFoc49eyU,3951
119
119
  torch_geometric/datasets/mnist_superpixels.py,sha256=o2ArbZ0_OE0u8VCaHmWwvngESlOFr9oM9dSEP_tjAS4,3340
120
120
  torch_geometric/datasets/modelnet.py,sha256=-qmLjlQiKVWmtHefAIIE97dQxEcaBfetMJnvgYZuwkg,5347
@@ -201,7 +201,7 @@ torch_geometric/explain/algorithm/base.py,sha256=lXynh9wMAKWN9tuCkcmsmNPwSUExTtg
201
201
  torch_geometric/explain/algorithm/captum.py,sha256=k6hNgC5Kn9lVirOYVJzej8-hRuf5C2mPFUXFLd2wWsY,12857
202
202
  torch_geometric/explain/algorithm/captum_explainer.py,sha256=oz-c40hvdzii4_chEQPHzQo_dFjHr9HLuJhDLsqRIVU,7346
203
203
  torch_geometric/explain/algorithm/dummy_explainer.py,sha256=jvcVQmfngmUWgoKa5p7CXzju2HM5D5DfieJhZW3gbLc,2872
204
- torch_geometric/explain/algorithm/gnn_explainer.py,sha256=iu45fGWdd4c6wNczWEAT-29HCAz7ncuoaS6cpx-xDJM,24660
204
+ torch_geometric/explain/algorithm/gnn_explainer.py,sha256=CmZZsJEK3PA14NND5CLHmyv37O8VrqHR8Q5faajShVY,24724
205
205
  torch_geometric/explain/algorithm/graphmask_explainer.py,sha256=6DisYN-dz2vhr1AlTPBIq6xSmpDdaNu306JKeLObNVI,21377
206
206
  torch_geometric/explain/algorithm/pg_explainer.py,sha256=LMlNcqSqtEP-IzYA7Xix6FoAogcrLUaEUAxDVyz2eyc,20162
207
207
  torch_geometric/explain/algorithm/utils.py,sha256=eh0ARPG41V7piVw5jdMYpV0p7WjTlpehnY-bWqPV_zg,2564
@@ -335,7 +335,7 @@ torch_geometric/nn/aggr/variance_preserving.py,sha256=fu-U_aGYpVLpgSFvVg0ONMe6nq
335
335
  torch_geometric/nn/attention/__init__.py,sha256=wLKTmlfP7qL9sZHy4cmDFHEtdwa-MEKE1dT51L1_w10,192
336
336
  torch_geometric/nn/attention/performer.py,sha256=2PCDn4_-oNTao2-DkXIaoi18anP01OxRELF2pvp-jk8,7357
337
337
  torch_geometric/nn/attention/qformer.py,sha256=7J-pWm_vpumK38IC-iCBz4oqL-BEIofEIxJ0wfjWq9A,2338
338
- torch_geometric/nn/attention/sgformer.py,sha256=U4R_tGF1IWyKDlV0t4jFNatW2-payc-hPGM3sFdiYBE,3812
338
+ torch_geometric/nn/attention/sgformer.py,sha256=OBC5HQxbY289bPDtwN8UbPH46To2GRTeVN-najogD-o,3747
339
339
  torch_geometric/nn/conv/__init__.py,sha256=37zTdt0gfSAUPMtwXjZg5mWx_itojJVFNODYR1h1ch0,3515
340
340
  torch_geometric/nn/conv/agnn_conv.py,sha256=5nEPLx_BBHcDaO6HWzLuHfXc0Yd_reKynAOH0Iq09lU,3077
341
341
  torch_geometric/nn/conv/antisymmetric_conv.py,sha256=dhA6sCETy1jlXReYJZBSyToOcL_mZ1wL10fMIb8Ppuw,4387
@@ -621,7 +621,7 @@ torch_geometric/utils/hetero.py,sha256=ok4uAAOyMiaeEPmvyS4DNoDwdKnLS2gmgs5WVVklx
621
621
  torch_geometric/utils/isolated.py,sha256=nUxCfMY3q9IIFjelr4eyAJH4sYG9W3lGdpWidnp3dm4,3588
622
622
  torch_geometric/utils/laplacian.py,sha256=ludDil4yS1A27PEuYOjZtCtE3o-t0lnucJKfiqENhvM,3695
623
623
  torch_geometric/utils/loop.py,sha256=MUWUS7a5GxuxLKlCtRq95U1hc3MndybAhqKD5IAe2RY,23051
624
- torch_geometric/utils/map.py,sha256=Bioo-NrnH2LBcPsnBJEQjLl0hGnoJkIYgfoLd0ffP5Y,5926
624
+ torch_geometric/utils/map.py,sha256=urEpmpf7SB4875nL7zR1Nc89wYMIcvzgBVfDgi3AHFc,6018
625
625
  torch_geometric/utils/mask.py,sha256=WOsfZLOMf1bunlwI6RH3evptbu0eOwNg19t6VOYboIo,2340
626
626
  torch_geometric/utils/mesh_laplacian.py,sha256=dqUEp7sOCBhWZPnUMAqa93OAj30dTDshcUpstt2iZDc,4387
627
627
  torch_geometric/utils/mixin.py,sha256=h4r5acaeEZ2azvwBcUbybevuoyhLE8qLBiERU7V9w20,699
@@ -637,7 +637,7 @@ torch_geometric/utils/undirected.py,sha256=H_nfpI0_WluOG6VfjPyldvcjL4w5USAKWu2x5
637
637
  torch_geometric/visualization/__init__.py,sha256=b-HnVesXjyJ_L1N-DnjiRiRVf7lhwKaBQF_2i5YMVSU,208
638
638
  torch_geometric/visualization/graph.py,sha256=mfZHXYfiU-CWMtfawYc80IxVwVmtK9hbIkSKhM_j7oI,14311
639
639
  torch_geometric/visualization/influence.py,sha256=CWMvuNA_Nf1sfbJmQgn58yS4OFpeKXeZPe7kEuvkUBw,477
640
- pyg_nightly-2.7.0.dev20250520.dist-info/licenses/LICENSE,sha256=ic-27cMJc1kWoMEYncz3Ya3Ur2Bi3bNLWib2DT763-o,1067
641
- pyg_nightly-2.7.0.dev20250520.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
642
- pyg_nightly-2.7.0.dev20250520.dist-info/METADATA,sha256=uiZk49LCu8ux1e299Kgd4pZgzqdZYDpu_TnHeoatBqo,62979
643
- pyg_nightly-2.7.0.dev20250520.dist-info/RECORD,,
640
+ pyg_nightly-2.7.0.dev20250522.dist-info/licenses/LICENSE,sha256=ic-27cMJc1kWoMEYncz3Ya3Ur2Bi3bNLWib2DT763-o,1067
641
+ pyg_nightly-2.7.0.dev20250522.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
642
+ pyg_nightly-2.7.0.dev20250522.dist-info/METADATA,sha256=makB42F3UZBMZpi25jsviAjYzUY48Ele4lPYcCaQmis,62952
643
+ pyg_nightly-2.7.0.dev20250522.dist-info/RECORD,,
@@ -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.7.0.dev20250520'
34
+ __version__ = '2.7.0.dev20250522'
35
35
 
36
36
  __all__ = [
37
37
  'Index',
@@ -57,7 +57,7 @@ class MD17(InMemoryDataset):
57
57
  +--------------------+--------------------+-------------------------------+-----------+
58
58
  | Uracil | DFT | :obj:`uracil` | 133,770 |
59
59
  +--------------------+--------------------+-------------------------------+-----------+
60
- | Naphthalene | DFT | :obj:`napthalene` | 326,250 |
60
+ | Naphthalene | DFT | :obj:`naphthalene` | 326,250 |
61
61
  +--------------------+--------------------+-------------------------------+-----------+
62
62
  | Aspirin | DFT | :obj:`aspirin` | 211,762 |
63
63
  +--------------------+--------------------+-------------------------------+-----------+
@@ -77,7 +77,7 @@ class MD17(InMemoryDataset):
77
77
  +--------------------+--------------------+-------------------------------+-----------+
78
78
  | Uracil (R) | DFT (PBE/def2-SVP) | :obj:`revised uracil` | 100,000 |
79
79
  +--------------------+--------------------+-------------------------------+-----------+
80
- | Naphthalene (R) | DFT (PBE/def2-SVP) | :obj:`revised napthalene` | 100,000 |
80
+ | Naphthalene (R) | DFT (PBE/def2-SVP) | :obj:`revised naphthalene` | 100,000 |
81
81
  +--------------------+--------------------+-------------------------------+-----------+
82
82
  | Aspirin (R) | DFT (PBE/def2-SVP) | :obj:`revised aspirin` | 100,000 |
83
83
  +--------------------+--------------------+-------------------------------+-----------+
@@ -309,7 +309,7 @@ class MD17(InMemoryDataset):
309
309
  file_names = {
310
310
  'benzene': 'md17_benzene2017.npz',
311
311
  'uracil': 'md17_uracil.npz',
312
- 'naphtalene': 'md17_naphthalene.npz',
312
+ 'naphthalene': 'md17_naphthalene.npz',
313
313
  'aspirin': 'md17_aspirin.npz',
314
314
  'salicylic acid': 'md17_salicylic.npz',
315
315
  'malonaldehyde': 'md17_malonaldehyde.npz',
@@ -61,7 +61,7 @@ class GNNExplainer(ExplainerAlgorithm):
61
61
  :attr:`~torch_geometric.explain.algorithm.GNNExplainer.coeffs`.
62
62
  """
63
63
 
64
- coeffs = {
64
+ default_coeffs = {
65
65
  'edge_size': 0.005,
66
66
  'edge_reduction': 'sum',
67
67
  'node_feat_size': 1.0,
@@ -75,6 +75,7 @@ class GNNExplainer(ExplainerAlgorithm):
75
75
  super().__init__()
76
76
  self.epochs = epochs
77
77
  self.lr = lr
78
+ self.coeffs = dict(self.default_coeffs)
78
79
  self.coeffs.update(kwargs)
79
80
 
80
81
  self.node_mask = self.hard_node_mask = None
@@ -559,7 +560,7 @@ class GNNExplainer(ExplainerAlgorithm):
559
560
  class GNNExplainer_:
560
561
  r"""Deprecated version for :class:`GNNExplainer`."""
561
562
 
562
- coeffs = GNNExplainer.coeffs
563
+ coeffs = GNNExplainer.default_coeffs
563
564
 
564
565
  conversion_node_mask_type = {
565
566
  'feature': 'common_attributes',
@@ -28,7 +28,6 @@ class SGFormerAttention(torch.nn.Module):
28
28
  ) -> None:
29
29
  super().__init__()
30
30
  assert channels % heads == 0
31
- assert heads == 1, 'The number of heads are fixed as 1.'
32
31
  if head_channels is None:
33
32
  head_channels = channels // heads
34
33
 
@@ -1,4 +1,3 @@
1
- import warnings
2
1
  from typing import Optional, Tuple, Union
3
2
 
4
3
  import numpy as np
@@ -6,6 +5,10 @@ import torch
6
5
  from torch import Tensor
7
6
  from torch.utils.dlpack import from_dlpack
8
7
 
8
+ from torch_geometric.warnings import WarningCache
9
+
10
+ _warning_cache = WarningCache()
11
+
9
12
 
10
13
  def map_index(
11
14
  src: Tensor,
@@ -93,10 +96,10 @@ def map_index(
93
96
  WITH_CUDF = True
94
97
  except ImportError:
95
98
  import pandas as pd
96
- warnings.warn("Using CPU-based processing within 'map_index' "
97
- "which may cause slowdowns and device "
98
- "synchronization. Consider installing 'cudf' to "
99
- "accelerate computation")
99
+ _warning_cache.warn("Using CPU-based processing within "
100
+ "'map_index' which may cause slowdowns and "
101
+ "device synchronization. Consider installing "
102
+ "'cudf' to accelerate computation")
100
103
  else:
101
104
  import pandas as pd
102
105
 
@@ -4,11 +4,11 @@ from typing import Literal
4
4
  import torch_geometric
5
5
 
6
6
 
7
- def warn(message: str) -> None:
7
+ def warn(message: str, stacklevel: int = 5) -> None:
8
8
  if torch_geometric.is_compiling():
9
9
  return
10
10
 
11
- warnings.warn(message)
11
+ warnings.warn(message, stacklevel=stacklevel)
12
12
 
13
13
 
14
14
  def filterwarnings(
@@ -19,3 +19,12 @@ def filterwarnings(
19
19
  return
20
20
 
21
21
  warnings.filterwarnings(action, message)
22
+
23
+
24
+ class WarningCache(set):
25
+ """Cache for warnings."""
26
+ def warn(self, message: str, stacklevel: int = 5) -> None:
27
+ """Trigger warning message."""
28
+ if message not in self:
29
+ self.add(message)
30
+ warn(message, stacklevel=stacklevel)