pyg-nightly 2.7.0.dev20250606__py3-none-any.whl → 2.7.0.dev20250607__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.dev20250606.dist-info → pyg_nightly-2.7.0.dev20250607.dist-info}/METADATA +1 -1
- {pyg_nightly-2.7.0.dev20250606.dist-info → pyg_nightly-2.7.0.dev20250607.dist-info}/RECORD +11 -11
- torch_geometric/__init__.py +1 -1
- torch_geometric/graphgym/utils/comp_budget.py +2 -1
- torch_geometric/nn/conv/eg_conv.py +7 -7
- torch_geometric/nn/models/gpse.py +28 -11
- torch_geometric/transforms/gdc.py +7 -8
- torch_geometric/transforms/normalize_features.py +3 -3
- torch_geometric/transforms/remove_duplicated_edges.py +4 -2
- {pyg_nightly-2.7.0.dev20250606.dist-info → pyg_nightly-2.7.0.dev20250607.dist-info}/WHEEL +0 -0
- {pyg_nightly-2.7.0.dev20250606.dist-info → pyg_nightly-2.7.0.dev20250607.dist-info}/licenses/LICENSE +0 -0
{pyg_nightly-2.7.0.dev20250606.dist-info → pyg_nightly-2.7.0.dev20250607.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pyg-nightly
|
3
|
-
Version: 2.7.0.
|
3
|
+
Version: 2.7.0.dev20250607
|
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=vcnOn9baJjUaV0fXJtIVEa7ebjfVArxTYurNLSuDfo4,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
|
@@ -250,7 +250,7 @@ torch_geometric/graphgym/models/transform.py,sha256=lbvGYQE0sRx-P5_eTgKbgx2PYWV1
|
|
250
250
|
torch_geometric/graphgym/utils/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
251
251
|
torch_geometric/graphgym/utils/__init__.py,sha256=an9dcDvVAgT3naLq5-Jv5gh2ZkuTlIvaullJIFMbprQ,641
|
252
252
|
torch_geometric/graphgym/utils/agg_runs.py,sha256=TGuArA50WcCT8twMVTLyPDRvV3OX8lXMaOKVceGOkPM,9301
|
253
|
-
torch_geometric/graphgym/utils/comp_budget.py,sha256=
|
253
|
+
torch_geometric/graphgym/utils/comp_budget.py,sha256=hZlCAU56eRa8n6dJ7-ypYtaPjGBwa6bMPHLewUPEKlg,3069
|
254
254
|
torch_geometric/graphgym/utils/device.py,sha256=B5lgc3KizEHja3q3Fz22SOENAUXRE8ufCx3aNepBAGk,1342
|
255
255
|
torch_geometric/graphgym/utils/epoch.py,sha256=cIlX0Oipx2s4Q8rPJgbLRFQbPqKKNeOynUtGyeyjoFI,690
|
256
256
|
torch_geometric/graphgym/utils/io.py,sha256=gqcAXncTCcM9tJpai0LoCokHLoCftnpIgYTPBKARvFY,2049
|
@@ -350,7 +350,7 @@ torch_geometric/nn/conv/dir_gnn_conv.py,sha256=QWtmSDYKAHSlvRQF4XKhsIw7TFqUNTJS6
|
|
350
350
|
torch_geometric/nn/conv/dna_conv.py,sha256=i4SiBRzZ9a_f1NF_43UCvxd881gfKX1rfxVRWqWWY-g,12242
|
351
351
|
torch_geometric/nn/conv/edge_conv.py,sha256=HFcsyOYueRAkkoh6Ifvgj63XcXKkNE3lj4WmKvC9C54,5446
|
352
352
|
torch_geometric/nn/conv/edge_updater.jinja,sha256=sCAQMr88Whl4qLqPJ2lGVnBFjllavbHx5N02In81mfk,2216
|
353
|
-
torch_geometric/nn/conv/eg_conv.py,sha256=
|
353
|
+
torch_geometric/nn/conv/eg_conv.py,sha256=2MB3Q2qP16i4f0M6zbuzHLLo5z5T1rTzd6vexq-o1mA,10770
|
354
354
|
torch_geometric/nn/conv/fa_conv.py,sha256=l7R0QbgG-GnET5wq7W45eaVL6VE0fh_U5VJJ1v-v5PY,9065
|
355
355
|
torch_geometric/nn/conv/feast_conv.py,sha256=C5T2-t_3pDW07axRKWL-0WXvtPF6kY8RWBoeqlIKdaU,4430
|
356
356
|
torch_geometric/nn/conv/film_conv.py,sha256=Bg9B35RiqK0cFKv6o2Tafm_o5m3NStTygwHmjw4DZjU,6314
|
@@ -444,7 +444,7 @@ torch_geometric/nn/models/g_retriever.py,sha256=tVibbqM_r-1LnA3R3oVyzp0bpuN3qPoY
|
|
444
444
|
torch_geometric/nn/models/git_mol.py,sha256=Wc6Hx6RDDR7sDWRWHfA5eK9e9gFsrTZ9OLmpMfoj3pE,12676
|
445
445
|
torch_geometric/nn/models/glem.py,sha256=1Tl9lb5i8-GwtYMiqFtRmgAC7esSr606ekd2RXXBX2Y,16449
|
446
446
|
torch_geometric/nn/models/gnnff.py,sha256=15dkiLgy0LmH1hnUrpeoHioIp4BPTfjpVATpnGRt9E0,7860
|
447
|
-
torch_geometric/nn/models/gpse.py,sha256=
|
447
|
+
torch_geometric/nn/models/gpse.py,sha256=jamaDD5chKka44c9O1-x6ytkgi53Og8YPZWV0Wjn5jQ,41999
|
448
448
|
torch_geometric/nn/models/graph_mixer.py,sha256=mthMeCOikR8gseEsu4oJ3Cd9C35zHSv1p32ROwnG-6s,9246
|
449
449
|
torch_geometric/nn/models/graph_unet.py,sha256=N8TSmJo8AlbZjjcame0xW_jZvMOirL5ahw6qv5Yjpbs,5586
|
450
450
|
torch_geometric/nn/models/jumping_knowledge.py,sha256=9JR2EoViXKjcDSLb8tjJm-UHfv1mQCJvZAAEsYa0Ocw,5496
|
@@ -542,7 +542,7 @@ torch_geometric/transforms/face_to_edge.py,sha256=ohAWtpiCs_qHwrrYmz2eLvAcd_bhfP
|
|
542
542
|
torch_geometric/transforms/feature_propagation.py,sha256=GPiKiGU7OuOpBBJeATlCtAtBUy_DSHUoBnJdDK8T81E,3056
|
543
543
|
torch_geometric/transforms/fixed_points.py,sha256=sfcqHZSw542LIYmq1DrTJdyncDRa2Uxf5N50G5lYSfQ,2426
|
544
544
|
torch_geometric/transforms/gcn_norm.py,sha256=INi8f8J3i2OXWgX5U4GNKROpcvJNW42qO39EdLPRPS8,1397
|
545
|
-
torch_geometric/transforms/gdc.py,sha256=
|
545
|
+
torch_geometric/transforms/gdc.py,sha256=kivoZFHpTJ4Tf_w8fiolkSMP_tl31E-21NbuYRigVis,20245
|
546
546
|
torch_geometric/transforms/generate_mesh_normals.py,sha256=eJsmdLPXID7M3xeyQsAjBVugPr4DeSTQ6isheAcoKQs,1028
|
547
547
|
torch_geometric/transforms/grid_sampling.py,sha256=aM2NaogaG3XLiKcqZzsDXBnqlJM8tX02qDVaFwY5XmQ,2564
|
548
548
|
torch_geometric/transforms/half_hop.py,sha256=xNnLO1J_b7AodwqkAxaZxDr9vScv92LTWLKdwqUQD8k,4102
|
@@ -555,7 +555,7 @@ torch_geometric/transforms/local_cartesian.py,sha256=oF18aDM4i38E8OSMJOgRrHFpalo
|
|
555
555
|
torch_geometric/transforms/local_degree_profile.py,sha256=4haxPEyKKo4qK869jPW0bAwZNOFdlPzdUEjqY2ApKd0,1480
|
556
556
|
torch_geometric/transforms/mask.py,sha256=acFjlAsaT-LyThyEM_S_8ghhqotNPjQrhkUAxXw5a9Q,4838
|
557
557
|
torch_geometric/transforms/node_property_split.py,sha256=nwK8PT-xWBc4NDIc20ZAK1-S-2SHPvZ2LqIe6ISf-zc,6075
|
558
|
-
torch_geometric/transforms/normalize_features.py,sha256=
|
558
|
+
torch_geometric/transforms/normalize_features.py,sha256=RmljMqn7t9UC-n2CU9an7BnTlsgKWujpY5e9nz4mh9Q,1064
|
559
559
|
torch_geometric/transforms/normalize_rotation.py,sha256=S_r1G5OtBlCjAmP8plM6m2qoM52J64tv7vGQPIvD8kY,1782
|
560
560
|
torch_geometric/transforms/normalize_scale.py,sha256=Q_fKOdZzJ7bLlgraDeRuSAIw_BhsXNOrYqINqhvh6Cw,666
|
561
561
|
torch_geometric/transforms/one_hot_degree.py,sha256=ITKs4QMaf6dx4e5GYup316kkYhCX0-U1XTZ9EAMec4U,1584
|
@@ -570,7 +570,7 @@ torch_geometric/transforms/random_node_split.py,sha256=1B9lEb_AKMpIWCe3l51FO8GKV
|
|
570
570
|
torch_geometric/transforms/random_rotate.py,sha256=5DIHYmsu2FQuZnwsQMQYD1msMnJf_C1FWQHKSdkEsrA,1946
|
571
571
|
torch_geometric/transforms/random_scale.py,sha256=Qc0ciXDKQ8CEqOnacePyT0WLtOO74L2ABsiGRWYAVmU,1261
|
572
572
|
torch_geometric/transforms/random_shear.py,sha256=TXnxdrvLRNdsi9NIYev9941MvrW2SFdYs1FFfAjV26A,1365
|
573
|
-
torch_geometric/transforms/remove_duplicated_edges.py,sha256=
|
573
|
+
torch_geometric/transforms/remove_duplicated_edges.py,sha256=FpI6omjr_QWLFj7WCNMbhrJZXu0e0qp-dXH9e9xBNd8,1976
|
574
574
|
torch_geometric/transforms/remove_isolated_nodes.py,sha256=Q89b73es1tPsAmTdS7tWTIM7JcPUpL37v3EZTAd25Fc,2449
|
575
575
|
torch_geometric/transforms/remove_self_loops.py,sha256=JfoooSnTO2KPXXuC3KWGhLS0tqr4yiXOl3A0sVv2riM,1221
|
576
576
|
torch_geometric/transforms/remove_training_classes.py,sha256=GMCZwI_LYo2ZF29DABZXeuM0Sn2i3twx_V3KBUGu2As,932
|
@@ -640,7 +640,7 @@ torch_geometric/utils/undirected.py,sha256=H_nfpI0_WluOG6VfjPyldvcjL4w5USAKWu2x5
|
|
640
640
|
torch_geometric/visualization/__init__.py,sha256=b-HnVesXjyJ_L1N-DnjiRiRVf7lhwKaBQF_2i5YMVSU,208
|
641
641
|
torch_geometric/visualization/graph.py,sha256=mfZHXYfiU-CWMtfawYc80IxVwVmtK9hbIkSKhM_j7oI,14311
|
642
642
|
torch_geometric/visualization/influence.py,sha256=CWMvuNA_Nf1sfbJmQgn58yS4OFpeKXeZPe7kEuvkUBw,477
|
643
|
-
pyg_nightly-2.7.0.
|
644
|
-
pyg_nightly-2.7.0.
|
645
|
-
pyg_nightly-2.7.0.
|
646
|
-
pyg_nightly-2.7.0.
|
643
|
+
pyg_nightly-2.7.0.dev20250607.dist-info/licenses/LICENSE,sha256=ic-27cMJc1kWoMEYncz3Ya3Ur2Bi3bNLWib2DT763-o,1067
|
644
|
+
pyg_nightly-2.7.0.dev20250607.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
645
|
+
pyg_nightly-2.7.0.dev20250607.dist-info/METADATA,sha256=EXeRSe9kFPGkT1eqa7TcyOPP1U78_Zu1hxrsgPLvkYo,62967
|
646
|
+
pyg_nightly-2.7.0.dev20250607.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.7.0.
|
34
|
+
__version__ = '2.7.0.dev20250607'
|
35
35
|
|
36
36
|
__all__ = [
|
37
37
|
'Index',
|
@@ -18,8 +18,9 @@ def get_stats():
|
|
18
18
|
return params_count(model)
|
19
19
|
|
20
20
|
|
21
|
-
def match_computation(stats_baseline, key=
|
21
|
+
def match_computation(stats_baseline, key=None, mode='sqrt'):
|
22
22
|
"""Match computation budget by modifying :obj:`cfg.gnn.dim_inner`."""
|
23
|
+
key = key or ['gnn', 'dim_inner']
|
23
24
|
stats = get_stats()
|
24
25
|
if stats != stats_baseline:
|
25
26
|
# Phase 1: fast approximation
|
@@ -81,7 +81,7 @@ class EGConv(MessagePassing):
|
|
81
81
|
self,
|
82
82
|
in_channels: int,
|
83
83
|
out_channels: int,
|
84
|
-
aggregators: List[str] =
|
84
|
+
aggregators: Optional[List[str]] = None,
|
85
85
|
num_heads: int = 8,
|
86
86
|
num_bases: int = 4,
|
87
87
|
cached: bool = False,
|
@@ -96,23 +96,23 @@ class EGConv(MessagePassing):
|
|
96
96
|
f"divisible by the number of heads "
|
97
97
|
f"(got {num_heads})")
|
98
98
|
|
99
|
-
for a in aggregators:
|
100
|
-
if a not in ['sum', 'mean', 'symnorm', 'min', 'max', 'var', 'std']:
|
101
|
-
raise ValueError(f"Unsupported aggregator: '{a}'")
|
102
|
-
|
103
99
|
self.in_channels = in_channels
|
104
100
|
self.out_channels = out_channels
|
105
101
|
self.num_heads = num_heads
|
106
102
|
self.num_bases = num_bases
|
107
103
|
self.cached = cached
|
108
104
|
self.add_self_loops = add_self_loops
|
109
|
-
self.aggregators = aggregators
|
105
|
+
self.aggregators = aggregators or ['symnorm']
|
106
|
+
|
107
|
+
for a in self.aggregators:
|
108
|
+
if a not in ['sum', 'mean', 'symnorm', 'min', 'max', 'var', 'std']:
|
109
|
+
raise ValueError(f"Unsupported aggregator: '{a}'")
|
110
110
|
|
111
111
|
self.bases_lin = Linear(in_channels,
|
112
112
|
(out_channels // num_heads) * num_bases,
|
113
113
|
bias=False, weight_initializer='glorot')
|
114
114
|
self.comb_lin = Linear(in_channels,
|
115
|
-
num_heads * num_bases * len(aggregators))
|
115
|
+
num_heads * num_bases * len(self.aggregators))
|
116
116
|
|
117
117
|
if bias:
|
118
118
|
self.bias = Parameter(torch.empty(out_channels))
|
@@ -716,11 +716,18 @@ class GPSENodeEncoder(torch.nn.Module):
|
|
716
716
|
|
717
717
|
|
718
718
|
@torch.no_grad()
|
719
|
-
def gpse_process(
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
719
|
+
def gpse_process(
|
720
|
+
model: Module,
|
721
|
+
data: Data,
|
722
|
+
rand_type: str,
|
723
|
+
use_vn: bool = True,
|
724
|
+
bernoulli_thresh: float = 0.5,
|
725
|
+
neighbor_loader: bool = False,
|
726
|
+
num_neighbors: Optional[List[int]] = None,
|
727
|
+
fillval: int = 5,
|
728
|
+
layers_mp: int = None,
|
729
|
+
**kwargs,
|
730
|
+
) -> torch.Tensor:
|
724
731
|
r"""Processes the data using the :class:`GPSE` model to generate and append
|
725
732
|
GPSE encodings. Identical to :obj:`gpse_process_batch`, but operates on a
|
726
733
|
single :class:`~torch_geometric.data.Dataset` object.
|
@@ -784,6 +791,8 @@ def gpse_process(model: Module, data: Data, rand_type: str,
|
|
784
791
|
if layers_mp is None:
|
785
792
|
raise ValueError('Please provide the number of message-passing '
|
786
793
|
'layers as "layers_mp".')
|
794
|
+
|
795
|
+
num_neighbors = num_neighbors or [30, 20, 10]
|
787
796
|
diff = layers_mp - len(num_neighbors)
|
788
797
|
if fillval > 0 and diff > 0:
|
789
798
|
num_neighbors += [fillval] * diff
|
@@ -806,12 +815,18 @@ def gpse_process(model: Module, data: Data, rand_type: str,
|
|
806
815
|
|
807
816
|
|
808
817
|
@torch.no_grad()
|
809
|
-
def gpse_process_batch(
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
818
|
+
def gpse_process_batch(
|
819
|
+
model: GPSE,
|
820
|
+
batch,
|
821
|
+
rand_type: str,
|
822
|
+
use_vn: bool = True,
|
823
|
+
bernoulli_thresh: float = 0.5,
|
824
|
+
neighbor_loader: bool = False,
|
825
|
+
num_neighbors: Optional[List[int]] = None,
|
826
|
+
fillval: int = 5,
|
827
|
+
layers_mp: int = None,
|
828
|
+
**kwargs,
|
829
|
+
) -> Tuple[torch.Tensor, torch.Tensor]:
|
815
830
|
r"""Process a batch of data using the :class:`GPSE` model to generate and
|
816
831
|
append :class:`GPSE` encodings. Identical to `gpse_process`, but operates
|
817
832
|
on a batch of :class:`~torch_geometric.data.Data` objects.
|
@@ -881,6 +896,8 @@ def gpse_process_batch(model: GPSE, batch, rand_type: str, use_vn: bool = True,
|
|
881
896
|
if layers_mp is None:
|
882
897
|
raise ValueError('Please provide the number of message-passing '
|
883
898
|
'layers as "layers_mp".')
|
899
|
+
|
900
|
+
num_neighbors = num_neighbors or [30, 20, 10]
|
884
901
|
diff = layers_mp - len(num_neighbors)
|
885
902
|
if fillval > 0 and diff > 0:
|
886
903
|
num_neighbors += [fillval] * diff
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any, Dict, Tuple
|
1
|
+
from typing import Any, Dict, Optional, Tuple
|
2
2
|
|
3
3
|
import numpy as np
|
4
4
|
import torch
|
@@ -78,18 +78,17 @@ class GDC(BaseTransform):
|
|
78
78
|
self_loop_weight: float = 1.,
|
79
79
|
normalization_in: str = 'sym',
|
80
80
|
normalization_out: str = 'col',
|
81
|
-
diffusion_kwargs: Dict[str, Any] =
|
82
|
-
sparsification_kwargs: Dict[str, Any] =
|
83
|
-
method='threshold',
|
84
|
-
avg_degree=64,
|
85
|
-
),
|
81
|
+
diffusion_kwargs: Optional[Dict[str, Any]] = None,
|
82
|
+
sparsification_kwargs: Optional[Dict[str, Any]] = None,
|
86
83
|
exact: bool = True,
|
87
84
|
) -> None:
|
88
85
|
self.self_loop_weight = self_loop_weight
|
89
86
|
self.normalization_in = normalization_in
|
90
87
|
self.normalization_out = normalization_out
|
91
|
-
self.diffusion_kwargs = diffusion_kwargs
|
92
|
-
|
88
|
+
self.diffusion_kwargs = diffusion_kwargs or dict(
|
89
|
+
method='ppr', alpha=0.15)
|
90
|
+
self.sparsification_kwargs = sparsification_kwargs or dict(
|
91
|
+
method='threshold', avg_degree=64)
|
93
92
|
self.exact = exact
|
94
93
|
|
95
94
|
if self_loop_weight:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import List, Union
|
1
|
+
from typing import List, Optional, Union
|
2
2
|
|
3
3
|
from torch_geometric.data import Data, HeteroData
|
4
4
|
from torch_geometric.data.datapipes import functional_transform
|
@@ -14,8 +14,8 @@ class NormalizeFeatures(BaseTransform):
|
|
14
14
|
attrs (List[str]): The names of attributes to normalize.
|
15
15
|
(default: :obj:`["x"]`)
|
16
16
|
"""
|
17
|
-
def __init__(self, attrs: List[str] =
|
18
|
-
self.attrs = attrs
|
17
|
+
def __init__(self, attrs: Optional[List[str]] = None) -> None:
|
18
|
+
self.attrs = attrs or ["x"]
|
19
19
|
|
20
20
|
def forward(
|
21
21
|
self,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import List, Union
|
1
|
+
from typing import List, Optional, Union
|
2
2
|
|
3
3
|
from torch_geometric.data import Data, HeteroData
|
4
4
|
from torch_geometric.data.datapipes import functional_transform
|
@@ -22,9 +22,11 @@ class RemoveDuplicatedEdges(BaseTransform):
|
|
22
22
|
"""
|
23
23
|
def __init__(
|
24
24
|
self,
|
25
|
-
key: Union[str, List[str]] =
|
25
|
+
key: Optional[Union[str, List[str]]] = None,
|
26
26
|
reduce: str = "add",
|
27
27
|
) -> None:
|
28
|
+
key = key or ['edge_attr', 'edge_weight']
|
29
|
+
|
28
30
|
if isinstance(key, str):
|
29
31
|
key = [key]
|
30
32
|
|
File without changes
|
{pyg_nightly-2.7.0.dev20250606.dist-info → pyg_nightly-2.7.0.dev20250607.dist-info}/licenses/LICENSE
RENAMED
File without changes
|