github pyg-team/pytorch_geometric 2.7.0
PyG 2.7.0

2 days ago

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

Deprecation

  • Deprecated torch_geometric.distributed (#10411)

Bugfixes

  • Fixed ogbn_train_cugraph example for distributed cuGraph (#10439)
  • Added safe_onnx_export function with workarounds for onnx_ir.serde.SerdeError issues in ONNX export (#10422)
  • Fixed importing PyTorch Lightning in torch_geometric.graphgym and torch_geometric.data.lightning when using lightning instead of pytorch-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 ensuring cudf column names are correctly specified (#10343)
  • Fixed _recursive_config() for torch.nn.ModuleList and torch.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() and is_edge_attr() errors when cat_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 to Data and HeterData (#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 to PatchTransformerAggregation #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 and ogbn_train_cugraph_multigpu.py for ogbn-arxiv, ogbn-products and ogbn-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 to Neo4j Graph DB integration demo (#9748)
  • Added MoleculeGPT example (#9710)
  • Added nn.models.GLEM (#9662)
  • Added TAGDataset (#9662)
  • Added support for fast Delaunay() triangulation via the torch_delaunay package (#9748)
  • Added PyTorch 2.5 support (#9779, #9779)
  • Support 3D tetrahedral mesh elements of shape [4, num_faces] in the FaceToEdge transformation (#9776)
  • Added the use_pcst option to WebQSPDataset (#9722)
  • Allowed users to pass edge_weight to GraphUNet models (#9737)
  • Consolidated examples/ogbn_{papers_100m,products_gat,products_sage}.py into examples/ogbn_train.py (#9467)
  • Add ComplexWebQuestions (CWQ) dataset (#9950)

Changes

  • Adapt dgcnn_classification example to work with ModelNet and MedShapeNet 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 to np.isin (#10283)

New Contributors

Full Changelog: 2.6.0...2.7.0

Don't miss a new pytorch_geometric release

NewReleases is sending notifications on new releases.