pyg-nightly 2.7.0.dev20241027__py3-none-any.whl → 2.7.0.dev20241030__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.dev20241027.dist-info → pyg_nightly-2.7.0.dev20241030.dist-info}/METADATA +1 -1
- {pyg_nightly-2.7.0.dev20241027.dist-info → pyg_nightly-2.7.0.dev20241030.dist-info}/RECORD +7 -7
- torch_geometric/__init__.py +1 -1
- torch_geometric/datasets/web_qsp_dataset.py +20 -15
- torch_geometric/nn/aggr/set_transformer.py +1 -1
- torch_geometric/nn/models/graph_unet.py +11 -3
- {pyg_nightly-2.7.0.dev20241027.dist-info → pyg_nightly-2.7.0.dev20241030.dist-info}/WHEEL +0 -0
{pyg_nightly-2.7.0.dev20241027.dist-info → pyg_nightly-2.7.0.dev20241030.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyg-nightly
|
3
|
-
Version: 2.7.0.
|
3
|
+
Version: 2.7.0.dev20241030
|
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=3fWdahlPEuZccsWnhlRAviJ7SNW7r5WjYq5zjHr7QwA,1904
|
2
2
|
torch_geometric/_compile.py,sha256=REjj1_qX8YBrva6iqr3AsNiDueTAy2BhLZkdezKL2MY,1322
|
3
3
|
torch_geometric/_onnx.py,sha256=V9ffrIKSqhDw6xUZ12lkuSfNs48cQp2EeJ6Z19GfnVw,349
|
4
4
|
torch_geometric/backend.py,sha256=lVaf7aLoVaB3M-UcByUJ1G4T4FOK6LXAg0CF4W3E8jo,1575
|
@@ -149,7 +149,7 @@ torch_geometric/datasets/tosca.py,sha256=nUSF8NQT1GlkwWQLshjWmr8xORsvRHzzIqhUyDC
|
|
149
149
|
torch_geometric/datasets/tu_dataset.py,sha256=14OSaXBgVwT1dX2h1wZ3xVIwoo0GQBEfR3yWh6Q0VF0,7847
|
150
150
|
torch_geometric/datasets/twitch.py,sha256=qfEerf-Uaojx2ZvegENowdG4E7RoUT_HUO9xtULadvo,3658
|
151
151
|
torch_geometric/datasets/upfd.py,sha256=crqO8uQNz1wC1JOn4prSs8iOGv9LuLK3dZf_KUV9tUE,7010
|
152
|
-
torch_geometric/datasets/web_qsp_dataset.py,sha256=
|
152
|
+
torch_geometric/datasets/web_qsp_dataset.py,sha256=tCVMFRT1FqlukkrdcN-qS2jYWvVYocy3-_ZeCpWwIEk,8905
|
153
153
|
torch_geometric/datasets/webkb.py,sha256=beC1kWeW7cIjYwWyaINQSk-3lmVR85Lus7cKZniHp8Y,4879
|
154
154
|
torch_geometric/datasets/wikics.py,sha256=iTzYif1WvbMXnMdhPMfvrkVaAbnM009WiB_f_JWZqhU,3879
|
155
155
|
torch_geometric/datasets/wikidata.py,sha256=9mYShF_HlpTmcdLpiaP_tYJ9eQtUOu5vRPvohN6RXqI,4979
|
@@ -320,7 +320,7 @@ torch_geometric/nn/aggr/patch_transformer.py,sha256=SP--1IaXrHWjjGgH7yIPeO84b5NA
|
|
320
320
|
torch_geometric/nn/aggr/quantile.py,sha256=sRnKyt4CXr9RmjoPyTl4VUvXgSCMl9PG-fhCGsSZ76c,6189
|
321
321
|
torch_geometric/nn/aggr/scaler.py,sha256=GV6gxUFBoKYMQTGybwzoPh708OY6k6chtUYmCIbFGXk,4638
|
322
322
|
torch_geometric/nn/aggr/set2set.py,sha256=4GdmsjbBIrap3CG2naeFNsYe5eE-fhrNQOXM1-TIxyM,2446
|
323
|
-
torch_geometric/nn/aggr/set_transformer.py,sha256=
|
323
|
+
torch_geometric/nn/aggr/set_transformer.py,sha256=FG7_JizpFX14M6VSCwLSjYXYdJ1ZiQVbvnaYHIraiuM,4213
|
324
324
|
torch_geometric/nn/aggr/sort.py,sha256=bvOOWnFkNOBOZih4rqVZQsjfeDX3vmXo1bpPSFD846w,2507
|
325
325
|
torch_geometric/nn/aggr/utils.py,sha256=CLJ-ZrVWYIOBpdhQBLAz94dj3cMKKKc3qwGr4DFbiCU,8338
|
326
326
|
torch_geometric/nn/aggr/variance_preserving.py,sha256=fu-U_aGYpVLpgSFvVg0ONMe6nqoyv8tZ6Y35qMYTf9w,1126
|
@@ -430,7 +430,7 @@ torch_geometric/nn/models/dimenet_utils.py,sha256=xP_nbzkSSL25GC3rrZ9KP8x9QZ59S-
|
|
430
430
|
torch_geometric/nn/models/g_retriever.py,sha256=VueRImNJlh1WvRWcsSXliSw8RlxlzWlu2WSFs_VQaJc,7749
|
431
431
|
torch_geometric/nn/models/gnnff.py,sha256=15dkiLgy0LmH1hnUrpeoHioIp4BPTfjpVATpnGRt9E0,7860
|
432
432
|
torch_geometric/nn/models/graph_mixer.py,sha256=mthMeCOikR8gseEsu4oJ3Cd9C35zHSv1p32ROwnG-6s,9246
|
433
|
-
torch_geometric/nn/models/graph_unet.py,sha256
|
433
|
+
torch_geometric/nn/models/graph_unet.py,sha256=-IUj1mlvLTLywst2zifqQtmP1ra42SUuDn3T4EKQ5X4,5548
|
434
434
|
torch_geometric/nn/models/jumping_knowledge.py,sha256=9JR2EoViXKjcDSLb8tjJm-UHfv1mQCJvZAAEsYa0Ocw,5496
|
435
435
|
torch_geometric/nn/models/label_prop.py,sha256=6XYBKp7OLmUgcn-73jXXpYZpef9Za1m0gI9QLv2bMEw,3908
|
436
436
|
torch_geometric/nn/models/lightgcn.py,sha256=dXKiBvM96jGKLtYp4l90Fko4he0kKdR9fRw-0ZCqSrA,12466
|
@@ -618,6 +618,6 @@ torch_geometric/utils/undirected.py,sha256=H_nfpI0_WluOG6VfjPyldvcjL4w5USAKWu2x5
|
|
618
618
|
torch_geometric/visualization/__init__.py,sha256=PyR_4K5SafsJrBr6qWrkjKr6GBL1b7FtZybyXCDEVwY,154
|
619
619
|
torch_geometric/visualization/graph.py,sha256=AGKqbtTdL14w7xIhy6n3g4bpCOnujKt-pXHCNzovxB4,4784
|
620
620
|
torch_geometric/visualization/influence.py,sha256=CWMvuNA_Nf1sfbJmQgn58yS4OFpeKXeZPe7kEuvkUBw,477
|
621
|
-
pyg_nightly-2.7.0.
|
622
|
-
pyg_nightly-2.7.0.
|
623
|
-
pyg_nightly-2.7.0.
|
621
|
+
pyg_nightly-2.7.0.dev20241030.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
622
|
+
pyg_nightly-2.7.0.dev20241030.dist-info/METADATA,sha256=ztFS4megSeWysfzKay6-gH2gtlEUL8ESuBdVSUCFU1Q,62897
|
623
|
+
pyg_nightly-2.7.0.dev20241030.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.dev20241030'
|
34
34
|
|
35
35
|
__all__ = [
|
36
36
|
'Index',
|
@@ -21,12 +21,6 @@ def retrieval_via_pcst(
|
|
21
21
|
cost_e: float = 0.5,
|
22
22
|
) -> Tuple[Data, str]:
|
23
23
|
c = 0.01
|
24
|
-
if len(textual_nodes) == 0 or len(textual_edges) == 0:
|
25
|
-
desc = textual_nodes.to_csv(index=False) + "\n" + textual_edges.to_csv(
|
26
|
-
index=False,
|
27
|
-
columns=["src", "edge_attr", "dst"],
|
28
|
-
)
|
29
|
-
return data, desc
|
30
24
|
|
31
25
|
from pcst_fast import pcst_fast
|
32
26
|
|
@@ -135,13 +129,17 @@ class WebQSPDataset(InMemoryDataset):
|
|
135
129
|
If :obj:`"test"`, loads the test dataset. (default: :obj:`"train"`)
|
136
130
|
force_reload (bool, optional): Whether to re-process the dataset.
|
137
131
|
(default: :obj:`False`)
|
132
|
+
use_pcst (bool, optional): Whether to preprocess the dataset's graph
|
133
|
+
with PCST or return the full graphs. (default: :obj:`True`)
|
138
134
|
"""
|
139
135
|
def __init__(
|
140
136
|
self,
|
141
137
|
root: str,
|
142
138
|
split: str = "train",
|
143
139
|
force_reload: bool = False,
|
140
|
+
use_pcst: bool = True,
|
144
141
|
) -> None:
|
142
|
+
self.use_pcst = use_pcst
|
145
143
|
super().__init__(root, force_reload=force_reload)
|
146
144
|
|
147
145
|
if split not in {'train', 'val', 'test'}:
|
@@ -224,15 +222,22 @@ class WebQSPDataset(InMemoryDataset):
|
|
224
222
|
edge_index=edge_index,
|
225
223
|
edge_attr=edge_attr,
|
226
224
|
)
|
227
|
-
|
228
|
-
data,
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
225
|
+
if self.use_pcst and len(nodes) > 0 and len(edges) > 0:
|
226
|
+
data, desc = retrieval_via_pcst(
|
227
|
+
data,
|
228
|
+
question_embs[i],
|
229
|
+
nodes,
|
230
|
+
edges,
|
231
|
+
topk=3,
|
232
|
+
topk_e=5,
|
233
|
+
cost_e=0.5,
|
234
|
+
)
|
235
|
+
else:
|
236
|
+
desc = nodes.to_csv(index=False) + "\n" + edges.to_csv(
|
237
|
+
index=False,
|
238
|
+
columns=["src", "edge_attr", "dst"],
|
239
|
+
)
|
240
|
+
|
236
241
|
data.question = question
|
237
242
|
data.label = label
|
238
243
|
data.desc = desc
|
@@ -38,7 +38,7 @@ class SetTransformerAggregation(Aggregation):
|
|
38
38
|
(default: :obj:`1`)
|
39
39
|
concat (bool, optional): If set to :obj:`False`, the seed embeddings
|
40
40
|
are averaged instead of concatenated. (default: :obj:`True`)
|
41
|
-
|
41
|
+
layer_norm (str, optional): If set to :obj:`True`, will apply layer
|
42
42
|
normalization. (default: :obj:`False`)
|
43
43
|
dropout (float, optional): Dropout probability of attention weights.
|
44
44
|
(default: :obj:`0`)
|
@@ -79,12 +79,20 @@ class GraphUNet(torch.nn.Module):
|
|
79
79
|
for conv in self.up_convs:
|
80
80
|
conv.reset_parameters()
|
81
81
|
|
82
|
-
def forward(
|
83
|
-
|
82
|
+
def forward(
|
83
|
+
self,
|
84
|
+
x: Tensor,
|
85
|
+
edge_index: Tensor,
|
86
|
+
batch: OptTensor = None,
|
87
|
+
edge_weight: Tensor = None,
|
88
|
+
) -> Tensor:
|
84
89
|
"""""" # noqa: D419
|
85
90
|
if batch is None:
|
86
91
|
batch = edge_index.new_zeros(x.size(0))
|
87
|
-
|
92
|
+
|
93
|
+
if edge_weight is None:
|
94
|
+
edge_weight = x.new_ones(edge_index.size(1))
|
95
|
+
assert edge_weight.size(0) == edge_index.size(1)
|
88
96
|
|
89
97
|
x = self.down_convs[0](x, edge_index, edge_weight)
|
90
98
|
x = self.act(x)
|
File without changes
|