We are excited to announce the release of PyG 2.7 🎉🎉🎉
- Highlights
- Breaking Changes
- Features
- Bugfixes
- Changes
- Full Changelog
PyG 2.7 is the culmination of work from 53 contributors who have worked on features and bug-fixes for a total of over 282 commits since torch-geometric==2.6.0
.
Highlights
PyTorch 2.8 Support
PyG 2.7 is fully compatible with PyTorch 2.8 and supports the following combinations:
PyTorch 2.8 | cpu
| cu126
| cu128
| cu129
|
---|---|---|---|---|
Linux | ✅ | ✅ | ✅ | ✅ |
Windows | ✅ | ✅ | ✅ | ✅ |
macOS | ✅ |
In addition, PyG 2.7 supports two previous PyTorch minor releases, PyTorch 2.7 and 2.6:
PyTorch 2.7 | cpu
| cu118
| cu126
| cu128
|
---|---|---|---|---|
Linux | ✅ | ✅ | ✅ | ✅ |
Windows | ✅ | ✅ | ✅ | ✅ |
macOS | ✅ |
PyTorch 2.6 | cpu
| cu118
| cu124
| cu126
|
---|---|---|---|---|
Linux | ✅ | ✅ | ✅ | ✅ |
Windows | ✅ | ✅ | ✅ | ✅ |
macOS | ✅ |
Breaking Changes
- Dropped support for Python 3.9 (#10461)
- Dropped support for PyTorch 1.11 - 2.5 (#10500, #10248, #10247)
Deprecation
- Deprecated
torch_geometric.distributed
(#10411)
Bugfixes
- Fixed
ogbn_train_cugraph
example for distributed cuGraph (#10439) - Added
safe_onnx_export
function with workarounds foronnx_ir.serde.SerdeError
issues in ONNX export (#10422) - Fixed importing PyTorch Lightning in
torch_geometric.graphgym
andtorch_geometric.data.lightning
when usinglightning
instead ofpytorch-lightning
(#10404, #10417)) - Fixed
detach()
warnings in example scripts involving tensor conversions (#10357) - Fixed non-tuple indexing to resolve PyTorch deprecation warning (#10389)
- Fixed conversion to/from
cuGraph
graph objects by ensuringcudf
column names are correctly specified (#10343) - Fixed
_recursive_config()
fortorch.nn.ModuleList
andtorch.nn.ModuleDict
(#10124, #10129) - Fixed the
k_hop_subgraph()
method for directed graphs (#9756) - Fixed
utils.group_cat
concatenating dimension (#9766) - Fixed
WebQSDataset.process
raising exceptions (#9665) - Fixed
is_node_attr()
andis_edge_attr()
errors whencat_dim
is a tuple (#9895) - Avoid GRetriever instantiation when
num_gnn_layers == 0
(#10156)
Features
- Added llm generated explanations to
TAGDataset
(#9918) - Added
torch_geometric.llm
and its examples (#10436) - Added support for negative weights in
sparse_cross_entropy
(#10432) - Added
connected_components()
method toData
andHeterData
(#10388) - Added LPFormer Graph Transformer for Link Prediction (#9956)
- Added
BidirectionalSampler
, which samples both forwards and backwards on graph edges (#10126) - Enable Sampling both forwards and reverse edges on
NeighborSampler
(#10126) - Added ability to merge together
SamplerOutput
objects (#10126) - Added ability to get global row and col ids from
SamplerOutput
(#10200) - Added PyTorch 2.8 support (#10403)
- Added
Polynormer
model and example (#9908) - Added
ProteinMPNN
model and example (#10289) - Added the
Teeth3DS
dataset, an extended benchmark for intraoral 3D scan analysis (#9833) - Added
torch.device
toPatchTransformerAggregation
#10342 - Added
torch.device
to normalization layers #10341 - Added
total_influence
for quantifying long-range dependency (#10263) - Added
MedShapeNet
Dataset (#9823) - Added RelBench example (#10230)
- Added
CityNetwork
dataset (#10115) - Added
visualize_graph
to HeteroExplanation (#10207) - Added PyTorch 2.6 support (#10170)
- Added support for heterogenous graphs in
AttentionExplainer
(#10169) - Added support for heterogenous graphs in
PGExplainer
(#10168) - Added support for heterogenous graphs in
GNNExplainer
(#10158) - Added Graph Positional and Structural Encoder (GPSE) and example (#9018) (#10118)
- Added attract-repel link prediction example (#10107)
- Added
ARLinkPredictor
for implementing Attract-Repel embeddings for link prediction (#10105) - Improving documentation for cuGraph (#10083)
- Added
HashTensor
(#10072) - Added
SGFormer
model and example (#9904) - Added
AveragePopularity
metric for link prediction (#10022) - Added
Personalization
metric for link prediction (#10015) - Added
HitRatio
metric for link prediction (#10013) - Added Data Splitting Tutorial (#8366)
- Added
Diversity
metric for link prediction (#10009) - Added
Coverage
metric for link prediction (#10006) - Added Graph Transformer Tutorial (#8144)
- Consolidate Cugraph examples into
ogbn_train_cugraph.py
andogbn_train_cugraph_multigpu.py
forogbn-arxiv
,ogbn-products
andogbn-papers100M
(#9953) - Added
InstructMol
dataset (#9975) - Added support for weighted
LinkPredRecall
metric (#9947) - Added support for weighted
LinkPredNDCG
metric (#9945) - Added
LinkPredMetricCollection
(#9941) - Added various
GRetriever
architecture benchmarking examples (#9666) - Added
profiler.nvtxit
with some examples (#9666) - Added
loader.RagQueryLoader
with Remote Backend Example (#9666) - Added
data.LargeGraphIndexer
(#9666) - Added
GIT-Mol
(#9730) - Added comment in
g_retriever.py
pointing toNeo4j
Graph DB integration demo (#9748) - Added
MoleculeGPT
example (#9710) - Added
nn.models.GLEM
(#9662) - Added
TAGDataset
(#9662) - Added support for fast
Delaunay()
triangulation via thetorch_delaunay
package (#9748) - Added PyTorch 2.5 support (#9779, #9779)
- Support 3D tetrahedral mesh elements of shape
[4, num_faces]
in theFaceToEdge
transformation (#9776) - Added the
use_pcst
option toWebQSPDataset
(#9722) - Allowed users to pass
edge_weight
toGraphUNet
models (#9737) - Consolidated
examples/ogbn_{papers_100m,products_gat,products_sage}.py
intoexamples/ogbn_train.py
(#9467) - Add ComplexWebQuestions (CWQ) dataset (#9950)
Changes
- Adapt
dgcnn_classification
example to work withModelNet
andMedShapeNet
Datasets (#9823) - Chained exceptions explicitly instead of implicitly (#10242)
- Updated cuGraph examples to use buffered sampling which keeps data in memory and is significantly faster than the deprecated buffered sampling (#10079)
- Updated Dockerfile to use latest from NVIDIA (#9794)
- Dropped Python 3.8 support (#9696)
- Added a check that confirms that custom edge types of
NumNeighbors
actually exist in the graph (#9807) - Automatic num_params in LLM + update
GRetriever
default llm (#9938) - Updated calls to NumPy's deprecated
np.in1d
tonp.isin
(#10283)
New Contributors
- @JacekDuszenko made their first contribution in #9676
- @brs96 made their first contribution in #9686
- @eurunuela made their first contribution in #9735
- @nhadler made their first contribution in #9752
- @wzm2256 made their first contribution in #9743
- @darabos made their first contribution in #9773
- @Aiik made their first contribution in #9776
- @ybubnov made their first contribution in #9748
- @ryoji-kubo made their first contribution in #9756
- @valentingoelz made their first contribution in #9790
- @abertics made their first contribution in #9813
- @sbhavani made their first contribution in #9794
- @kolmiw made their first contribution in #9905
- @lukedoubleu made their first contribution in #9860
- @erytheis made their first contribution in #9927
- @RorryB made their first contribution in #9877
- @caic99 made their first contribution in #9949
- @fedelopez77 made their first contribution in #10124
- @tommyly201 made their first contribution in #10105
- @semihcanturk made their first contribution in #9018
- @JeS24 made their first contribution in #10208
- @LeonResearch made their first contribution in #10115
- @ShadowDragon5 made their first contribution in #10282
- @jeffguy made their first contribution in #10257
- @jdhenaos made their first contribution in #9823
- @co63oc made their first contribution in #10274
- @michaelfortunato made their first contribution in #10222
- @sanvila made their first contribution in #9817
- @emmanuel-ferdman made their first contribution in #10283
- @crns-smartvision made their first contribution in #9833
- @AJamal27891 made their first contribution in #10422
- @HarryShomer made their first contribution in #9956
- @chillerb made their first contribution in #10397
- @jesseangelis made their first contribution in #10388
- @nathanpainchaud made their first contribution in #10417
Full Changelog: 2.6.0...2.7.0