Skip to content

Releases: pyg-team/pytorch_geometric

2.0.4

12 Mar 16:43
Compare
Choose a tag to compare

PyG 2.0.4 🎉

A new minor PyG version release, bringing PyTorch 1.11 support to PyG. It further includes a variety of new features and bugfixes:

Features

Datasets

Minor Changes

Bugfixes

Read more

2.0.3

22 Dec 06:49
d47d9cd
Compare
Choose a tag to compare

PyG 2.0.3 🎉

A new minor PyG version release, including a variety of new features and bugfixes:

Features

Datasets

Minor Changes

Read more

2.0.2

26 Oct 12:41
Compare
Choose a tag to compare

A new minor version release, including further bugfixes, official PyTorch 1.10 support, as well as additional features and operators:

Features

Minor Changes

  • Data.to_homogeneous will now add node_type information to the homogeneous Data object
  • GINEConv now allows to transform edge features automatically in case their dimensionalities do not match (thanks to @CaypoH)
  • OGB_MAG will now add node_year information to paper nodes
  • Entities datasets do now allow the processing of HeteroData objects via the hetero=True option
  • Batch objects can now be batched together to form super batches
  • Added heterogeneous graph support for Center, Constant and LinearTransformation transformations
  • HeteroConv now allows to return "stacked" embeddings
  • The batch vector of a Batch object will now be initialized on the GPU in case other attributes are held in GPU memory

Bugfixes

  • Fixed the num_neighbors argument of NeighborLoader in order to specify an edge-type specific number of neighbors
  • Fixed the collate policy of lists of integers/strings to return nested lists
  • Fixed the Delaunay transformation in case the face attribute is not present in the data
  • Fixed the TGNMemory module to only read from the latest update (thanks to @cwh104504)
  • Fixed the pickle.PicklingError when Batch objects are used in a torch.multiprocessing.manager.Queue() (thanks to @RasmusOrsoe)
  • Fixed an issue with _parent state changing after pickling of Data objects (thanks to @zepx)
  • Fixed the ToUndirected transformation in case the number of edges and nodes are equal (thanks to @lmkmkrcc)
  • Fixed the from_networkx routine in case node-level and edge-level features share the same names
  • Removed the num_nodes warning when creating PairData objects
  • Fixed the initialization of the GeneralMultiLayer module in GraphGym (thanks to @fjulian)
  • Fixed custom model registration in GraphGym
  • Fixed a clash in the run_dir naming of GraphGym (thanks to @fjulian)
  • Includes a fix to prevent a GraphGym crash in case ROC-score is undefined (thanks to @fjulian)
  • Fixed the Batch.from_data_list routine on dataset slices (thanks to @dtortorella)
  • Fixed the MetaPath2Vec model in case there exists isolated nodes
  • Fixed torch_geometric.utils.coalesce with CUDA tensors

2.0.1

16 Sep 07:22
Compare
Choose a tag to compare

PyG 2.0.1

This is a minor release, bringing some emergency fixes to PyG 2.0.

Bugfixes

2.0.0

13 Sep 07:48
Compare
Choose a tag to compare

PyG 2.0 🎉 🎉 🎉

PyG (PyTorch Geometric) has been moved from my own personal account rusty1s to its own organization account pyg-team to emphasize the ongoing collaboration between TU Dortmund University, Stanford University and many great external contributors. With this, we are releasing PyG 2.0, a new major release that brings sophisticated heterogeneous graph support, GraphGym integration and many other exciting features to PyG.

If you encounter any bugs in this new release, please do not hesitate to create an issue.

Heterogeneous Graph Support

We finally provide full heterogeneous graph support in PyG 2.0. See here for the accompanying tutorial.

Highlights

  • Heterogeneous Graph Storage: Heterogeneous graphs can now be stored in their own dedicated data.HeteroData class (thanks to @yaoyaowd):

    from torch_geometric.data import HeteroData
    
    data = HeteroData()
    
    # Create two node types "paper" and "author" holding a single feature matrix:
    data['paper'].x = torch.randn(num_papers, num_paper_features)
    data['author'].x = torch.randn(num_authors, num_authors_features)
    
    # Create an edge type ("paper", "written_by", "author") holding its graph connectivity:
    data['paper', 'written_by', 'author'].edge_index = ...  # [2, num_edges]

    data.HeteroData behaves similar to a regular homgeneous data.Data object:

    print(data['paper'].num_nodes)
    print(data['paper', 'written_by', 'author'].num_edges)
    data = data.to('cuda')
  • Heterogeneous Mini-Batch Loading: Heterogeneous graphs can be converted to mini-batches for many small and single giant graphs via the loader.DataLoader and loader.NeighborLoader loaders, respectively. These loaders can now handle both homogeneous and heterogeneous graphs:

    from torch_geometric.loader import DataLoader
    
    loader = DataLoader(heterogeneous_graph_dataset, batch_size=32, shuffle=True)
    
    from torch_geometric.loader import NeighborLoader
    
    loader = NeighborLoader(heterogeneous_graph, num_neighbors=[30, 30], batch_size=128,
                            input_nodes=('paper', data['paper'].train_mask), shuffle=True)
  • Heterogeneous Graph Neural Networks: Heterogeneous GNNs can now easily be created from homogeneous ones via nn.to_hetero and nn.to_hetero_with_bases. These processes take an existing GNN model and duplicate their message functions to account for different node and edge types:

    from torch_geometric.nn import SAGEConv, to_hetero
    
    class GNN(torch.nn.Module):
        def __init__(hidden_channels, out_channels):
            super().__init__()
            self.conv1 = SAGEConv((-1, -1), hidden_channels)
            self.conv2 = SAGEConv((-1, -1), out_channels)
    
        def forward(self, x, edge_index):
            x = self.conv1(x, edge_index).relu()
            x = self.conv2(x, edge_index)
            return x
    
    model = GNN(hidden_channels=64, out_channels=dataset.num_classes)
    model = to_hetero(model, data.metadata(), aggr='sum')

Additional Features

Managing Experiments with GraphGym

GraphGym is now officially supported in PyG 2.0 via torch_geometric.graphgym. See here for the accompanying tutorial. Overall, GraphGym is a platform for designing and evaluating Graph Neural Networks from configuration files via a highly modularized pipeline (thanks to @JiaxuanYou):

  1. GraphGym is the perfect place to start learning about standardized GNN implementation and evaluation
  2. GraphGym provides a simple interface to try out thousands of GNN architectures in parallel to find the best design for your specific task
  3. GraphGym lets you easily do hyper-parameter search and visualize what design choices are better

Breaking Changes

Read more

1.7.2

26 Jun 08:50
Compare
Choose a tag to compare

Datasets

Bugfixes

1.7.1

17 Jun 08:19
Compare
Choose a tag to compare

A minor release that brings PyTorch 1.9.0 and Python 3.9 support to PyTorch Geometric. In case you are in the process of updating to PyTorch 1.9.0, please re-install the external dependencies for PyTorch 1.9.0 as well (torch-scatter and torch-sparse).

Features

Datasets

Issues

1.7.0

09 Apr 08:44
Compare
Choose a tag to compare

Major Features

Additional Features

Minor Changes

Datasets

Bugfixes

1.6.3

02 Dec 14:57
Compare
Choose a tag to compare

1.6.2

27 Nov 07:18
Compare
Choose a tag to compare

Features

Minor improvements

  • The SIGN example now operates on mini-batches of nodes
  • Improved data loading runtime of InMemoryDatasets
  • NeighborSampler does now work with SparseTensor as input
  • ToUndirected transform in order to convert directed graphs to undirected ones
  • GNNExplainer does now allow for customizable edge and node feature loss reduction
  • aggr can now passed to any GNN based on the MessagePassing interface (thanks to @m30m)
  • Runtime improvements in SEAL (thanks to @muhanzhang)
  • Runtime improvements in torch_geometric.utils.softmax (thanks to @Book1996)
  • GAE.recon_loss now supports custom negative edge indices (thanks to @reshinthadithyan)
  • Faster spmm computation and random_walk sampling on CPU (torch-sparse and torch-cluster updates required)
  • DataParallel does now support the follow_batch argument
  • Parallel approximate PPR computation in the GDC transform (thanks to @klicperajo)
  • Improved documentation by providing an autosummary of all subpackages (thanks to @m30m)
  • Improved documentation on how edge weights are handled in various GNNs (thanks to @m30m)

Bugfixes

  • Fixed a bug in GATConv when computing attention coefficients in bipartite graphs
  • Fixed a bug in GraphSAINTSampler that led to wrong edge feature sampling
  • Fixed the DimeNet pretraining link
  • Fixed a bug in processing ego-twitter and ego-gplus of the SNAPDataset collection
  • Fixed a number of broken dataset URLs (ICEWS18, QM9, QM7b, MoleculeNet, Entities, PPI, Reddit, MNISTSuperpixels, ShapeNet)
  • Fixed a bug in which MessagePassing.jittable() tried to write to a file without permission (thanks to @twoertwein)
  • GCNConv does not require edge_weight in case normalize=False
  • Batch.num_graphs will now report the correct amount of graphs in case of zero-sized graphs