We are excited to announce the release of PyG 2.7 πππ
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_cugraphexample for distributed cuGraph (#10439) - Added
safe_onnx_exportfunction with workarounds foronnx_ir.serde.SerdeErrorissues in ONNX export (#10422) - Fixed importing PyTorch Lightning in
torch_geometric.graphgymandtorch_geometric.data.lightningwhen usinglightninginstead 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
cuGraphgraph objects by ensuringcudfcolumn names are correctly specified (#10343) - Fixed
_recursive_config()fortorch.nn.ModuleListandtorch.nn.ModuleDict(#10124, #10129) - Fixed the
k_hop_subgraph()method for directed graphs (#9756) - Fixed
utils.group_catconcatenating dimension (#9766) - Fixed
WebQSDataset.processraising exceptions (#9665) - Fixed
is_node_attr()andis_edge_attr()errors whencat_dimis a tuple (#9895) - Avoid GRetriever instantiation when
num_gnn_layers == 0(#10156)
Features
- Added llm generated explanations to
TAGDataset(#9918) - Added
torch_geometric.llmand its examples (#10436) - Added support for negative weights in
sparse_cross_entropy(#10432) - Added
connected_components()method toDataandHeterData(#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
SamplerOutputobjects (#10126) - Added ability to get global row and col ids from
SamplerOutput(#10200) - Added PyTorch 2.8 support (#10403)
- Added
Polynormermodel and example (#9908) - Added
ProteinMPNNmodel and example (#10289) - Added the
Teeth3DSdataset, an extended benchmark for intraoral 3D scan analysis (#9833) - Added
torch.devicetoPatchTransformerAggregation#10342 - Added
torch.deviceto normalization layers #10341 - Added
total_influencefor quantifying long-range dependency (#10263) - Added
MedShapeNetDataset (#9823) - Added RelBench example (#10230)
- Added
CityNetworkdataset (#10115) - Added
visualize_graphto 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
ARLinkPredictorfor implementing Attract-Repel embeddings for link prediction (#10105) - Improving documentation for cuGraph (#10083)
- Added
HashTensor(#10072) - Added
SGFormermodel and example (#9904) - Added
AveragePopularitymetric for link prediction (#10022) - Added
Personalizationmetric for link prediction (#10015) - Added
HitRatiometric for link prediction (#10013) - Added Data Splitting Tutorial (#8366)
- Added
Diversitymetric for link prediction (#10009) - Added
Coveragemetric for link prediction (#10006) - Added Graph Transformer Tutorial (#8144)
- Consolidate Cugraph examples into
ogbn_train_cugraph.pyandogbn_train_cugraph_multigpu.pyforogbn-arxiv,ogbn-productsandogbn-papers100M(#9953) - Added
InstructMoldataset (#9975) - Added support for weighted
LinkPredRecallmetric (#9947) - Added support for weighted
LinkPredNDCGmetric (#9945) - Added
LinkPredMetricCollection(#9941) - Added various
GRetrieverarchitecture benchmarking examples (#9666) - Added
profiler.nvtxitwith some examples (#9666) - Added
loader.RagQueryLoaderwith Remote Backend Example (#9666) - Added
data.LargeGraphIndexer(#9666) - Added
GIT-Mol(#9730) - Added comment in
g_retriever.pypointing toNeo4jGraph DB integration demo (#9748) - Added
MoleculeGPTexample (#9710) - Added
nn.models.GLEM(#9662) - Added
TAGDataset(#9662) - Added support for fast
Delaunay()triangulation via thetorch_delaunaypackage (#9748) - Added PyTorch 2.5 support (#9779, #9779)
- Support 3D tetrahedral mesh elements of shape
[4, num_faces]in theFaceToEdgetransformation (#9776) - Added the
use_pcstoption toWebQSPDataset(#9722) - Allowed users to pass
edge_weighttoGraphUNetmodels (#9737) - Consolidated
examples/ogbn_{papers_100m,products_gat,products_sage}.pyintoexamples/ogbn_train.py(#9467) - Add ComplexWebQuestions (CWQ) dataset (#9950)
Changes
- Adapt
dgcnn_classificationexample to work withModelNetandMedShapeNetDatasets (#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
NumNeighborsactually exist in the graph (#9807) - Automatic num_params in LLM + update
GRetrieverdefault llm (#9938) - Updated calls to NumPy's deprecated
np.in1dtonp.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