Skip to content

Commit

Permalink
Merge branch 'master' into feature/adding_ssma_aggregation
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmogDavid authored Nov 15, 2024
2 parents 7da0b88 + 0fa52cb commit 0b594f6
Show file tree
Hide file tree
Showing 36 changed files with 325 additions and 109 deletions.
5 changes: 2 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ inputs:
default: '3.9'
torch-version:
required: false
default: '2.4.0'
default: '2.5.0'
cuda-version:
required: false
default: cpu
torchvision-version:
required: false
default: '0.19.0'
default: '0.20.0'
full_install:
required: false
default: true
Expand All @@ -31,7 +31,6 @@ runs:
pyproject.toml
- name: Install numpy
if: ${{ runner.os == 'Windows' }}
run: |
pip install "numpy<2"
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/building_pyg_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
os: [ubuntu-20.04, macos-14, windows-2019]
python-version: ['3.9', '3.10', '3.11', '3.12']
torch-version: [2.3.0, 2.4.0]
torch-version: [2.4.0, 2.5.0]
cuda-version: ['cpu', 'cu118', 'cu121', 'cu124']
exclude:
- torch-version: 2.3.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/building_rusty1s_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
os: [ubuntu-20.04, macos-14, windows-2019]
python-version: ['3.9', '3.10', '3.11', '3.12']
torch-version: [2.3.0, 2.4.0]
torch-version: [2.4.0, 2.5.0]
cuda-version: ['cpu', 'cu118', 'cu121', 'cu124']
exclude:
- torch-version: 2.3.0
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/dist_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }}
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

dist_pytest:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

make_html:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/full_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
python-version: ['3.9', '3.10']
torch-version: [1.13.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, nightly]
torch-version: [1.13.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, nightly]
include:
- torch-version: 1.13.0
torchvision-version: 0.14.0
Expand All @@ -30,6 +30,8 @@ jobs:
torchvision-version: 0.18.0
- torch-version: 2.4.0
torchvision-version: 0.19.0
- torch-version: 2.5.0
torchvision-version: 0.20.0
- torch-version: nightly
torchvision-version: nightly
exclude:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/latest_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

latest_pytest:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

mypy:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/minimal_testing.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: Testing minimal PyTorch 2.4
name: Testing minimal PyTorch 2.5

on: # yamllint disable-line rule:truthy
push:
branches:
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

minimal_pytest:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 6 * * *" # Everyday at 6:00am UTC/10:00pm PST

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

build:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/prev_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

prev_pytest:
Expand All @@ -14,14 +19,14 @@ jobs:
strategy:
fail-fast: false
matrix:
torch-version: [1.13.0, 2.1.0, 2.3.0]
torch-version: [1.13.0, 2.1.0, 2.4.0]
include:
- torch-version: 1.13.0
torchvision-version: 0.14.0
- torch-version: 2.1.0
torchvision-version: 0.16.0
- torch-version: 2.3.0
torchvision-version: 0.18.0
- torch-version: 2.4.0
torchvision-version: 0.19.0

steps:
- name: Checkout repository
Expand Down Expand Up @@ -54,7 +59,7 @@ jobs:
- name: Install main package
if: steps.changed-files-specific.outputs.only_changed != 'true'
run: |
pip install -e .[full,test]
pip install -e .[test]
- name: Run tests
if: steps.changed-files-specific.outputs.only_changed != 'true'
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: Testing PyTorch 2.4
name: Testing PyTorch 2.5

on: # yamllint disable-line rule:truthy
push:
branches:
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

pytest:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Added

- Added support for fast `Delaunay()` triangulation via the `torch_delaunay` package ([#9748](https://github.com/pyg-team/pytorch_geometric/pull/9748))
- Added PyTorch 2.5 support ([#9779](https://github.com/pyg-team/pytorch_geometric/pull/9779), [#9779](https://github.com/pyg-team/pytorch_geometric/pull/9780))
- Support 3D tetrahedral mesh elements of shape `[4, num_faces]` in the `FaceToEdge` transformation ([#9776](https://github.com/pyg-team/pytorch_geometric/pull/9776))
- Added the `use_pcst` option to `WebQSPDataset` ([#9722](https://github.com/pyg-team/pytorch_geometric/pull/9722))
- Allowed users to pass `edge_weight` to `GraphUNet` models ([#9737](https://github.com/pyg-team/pytorch_geometric/pull/9737))
- Consolidated `examples/ogbn_{papers_100m,products_gat,products_sage}.py` into `examples/ogbn_train.py` ([#9467](https://github.com/pyg-team/pytorch_geometric/pull/9467))
Expand All @@ -20,6 +23,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Fixed

- Fixed the `k_hop_subgraph()` method for directed graphs ([#9756](https://github.com/pyg-team/pytorch_geometric/pull/9756))
- Fixed `utils.group_cat` concatenating dimension ([#9766](https://github.com/pyg-team/pytorch_geometric/pull/9766))
- Fixed `WebQSDataset.process` raising exceptions ([#9665](https://github.com/pyg-team/pytorch_geometric/pull/9665))

### Removed
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,12 @@ We recommend to start with a minimal installation, and install additional depend

For ease of installation of these extensions, we provide `pip` wheels for all major OS/PyTorch/CUDA combinations, see [here](https://data.pyg.org/whl).

#### PyTorch 2.4
#### PyTorch 2.5

To install the binaries for PyTorch 2.4.0, simply run
To install the binaries for PyTorch 2.5.0, simply run

```
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.4.0+${CUDA}.html
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.5.0+${CUDA}.html
```

where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu121`, or `cu124` depending on your PyTorch installation.
Expand All @@ -387,23 +387,23 @@ where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu121`, or `cu124`
| **Windows** |||||
| **macOS** || | | |

#### PyTorch 2.3
#### PyTorch 2.4

To install the binaries for PyTorch 2.3.0, simply run
To install the binaries for PyTorch 2.4.0, simply run

```
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.3.0+${CUDA}.html
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.4.0+${CUDA}.html
```

where `${CUDA}` should be replaced by either `cpu`, `cu118`, or `cu121` depending on your PyTorch installation.
where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu121`, or `cu124` depending on your PyTorch installation.

| | `cpu` | `cu118` | `cu121` |
| ----------- | ----- | ------- | ------- |
| **Linux** ||||
| **Windows** ||||
| **macOS** || | |
| | `cpu` | `cu118` | `cu121` | `cu124` |
| ----------- | ----- | ------- | ------- | ------- |
| **Linux** |||||
| **Windows** |||||
| **macOS** || | | |

**Note:** Binaries of older versions are also provided for PyTorch 1.4.0, PyTorch 1.5.0, PyTorch 1.6.0, PyTorch 1.7.0/1.7.1, PyTorch 1.8.0/1.8.1, PyTorch 1.9.0, PyTorch 1.10.0/1.10.1/1.10.2, PyTorch 1.11.0, PyTorch 1.12.0/1.12.1, PyTorch 1.13.0/1.13.1, PyTorch 2.0.0/2.0.1, PyTorch 2.1.0/2.1.1/2.1.2, and PyTorch 2.2.0/2.2.1/2.2.2 (following the same procedure).
**Note:** Binaries of older versions are also provided for PyTorch 1.4.0, PyTorch 1.5.0, PyTorch 1.6.0, PyTorch 1.7.0/1.7.1, PyTorch 1.8.0/1.8.1, PyTorch 1.9.0, PyTorch 1.10.0/1.10.1/1.10.2, PyTorch 1.11.0, PyTorch 1.12.0/1.12.1, PyTorch 1.13.0/1.13.1, PyTorch 2.0.0/2.0.1, PyTorch 2.1.0/2.1.1/2.1.2, PyTorch 2.2.0/2.2.1/2.2.2, and PyTorch 2.3.0/2.3.1 (following the same procedure).
**For older versions, you might need to explicitly specify the latest supported version number** or install via `pip install --no-index` in order to prevent a manual installation from source.
You can look up the latest supported version number [here](https://data.pyg.org/whl).

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.xpu
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ RUN echo "source /opt/intel/oneapi/setvars.sh --force" >> /root/.bashrc

# Install PyG
RUN pip install ninja wheel ogb && pip install git+https://github.com/pyg-team/pyg-lib.git && \
pip install torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.4.0+cpu.html && \
pip install torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.5.0+cpu.html && \
pip install torch_geometric
13 changes: 7 additions & 6 deletions docs/source/install/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ For ease of installation of these extensions, we provide :obj:`pip` wheels for t
.. code-block:: none
python -c "import torch; print(torch.__version__)"
>>> 2.4.0
>>> 2.5.0
#. Find the CUDA version :pytorch:`PyTorch` was installed with:

Expand All @@ -89,26 +89,27 @@ For ease of installation of these extensions, we provide :obj:`pip` wheels for t
where :obj:`${TORCH}` and :obj:`${CUDA}` should be replaced by the specific :pytorch:`PyTorch` and CUDA versions, respectively:

* :pytorch:`PyTorch` 2.4: :obj:`${TORCH}=2.5.0` and :obj:`${CUDA}=cpu|cu118|cu121|cu124`
* :pytorch:`PyTorch` 2.4: :obj:`${TORCH}=2.4.0` and :obj:`${CUDA}=cpu|cu118|cu121|cu124`
* :pytorch:`PyTorch` 2.3: :obj:`${TORCH}=2.3.0` and :obj:`${CUDA}=cpu|cu118|cu121`
* :pytorch:`PyTorch` 2.2: :obj:`${TORCH}=2.2.0` and :obj:`${CUDA}=cpu|cu118|cu121`
* :pytorch:`PyTorch` 2.1: :obj:`${TORCH}=2.1.0` and :obj:`${CUDA}=cpu|cu118|cu121`
* :pytorch:`PyTorch` 2.0: :obj:`${TORCH}=2.0.0` and :obj:`${CUDA}=cpu|cu117|cu118`
* :pytorch:`PyTorch` 1.13: :obj:`${TORCH}=1.13.0` and :obj:`${CUDA}=cpu|cu116|cu117`

For example, for :pytorch:`PyTorch` 2.4.* and CUDA 12.4, type:
For example, for :pytorch:`PyTorch` 2.5.* and CUDA 12.4, type:

.. code-block:: none
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.4.0+cu124.html
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.5.0+cu124.html
For example, for :pytorch:`PyTorch` 2.3.* and CUDA 11.8, type:
For example, for :pytorch:`PyTorch` 2.4.* and CUDA 11.8, type:

.. code-block:: none
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.3.0+cu118.html
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.4.0+cu118.html
**Note:** Binaries of older versions are also provided for :pytorch:`PyTorch` 1.4.0, 1.5.0, 1.6.0, 1.7.0/1.7.1, 1.8.0/1.8.1, 1.9.0, 1.10.0/1.10.1/1.10.2, 1.11.0, 1.12.0/1.12.1, 1.13.0/1.13.1, 2.0.0/2.0.1, 2.1.0/2.1.1/2.1.2, and 2.2.0/2.2.1/2.2.2 (following the same procedure).
**Note:** Binaries of older versions are also provided for :pytorch:`PyTorch` 1.4.0, 1.5.0, 1.6.0, 1.7.0/1.7.1, 1.8.0/1.8.1, 1.9.0, 1.10.0/1.10.1/1.10.2, 1.11.0, 1.12.0/1.12.1, 1.13.0/1.13.1, 2.0.0/2.0.1, 2.1.0/2.1.1/2.1.2, 2.2.0/2.2.1/2.2.2, and 2.3.0/2.3.1 (following the same procedure).
**For older versions, you need to explicitly specify the latest supported version number** or install via :obj:`pip install --no-index` in order to prevent a manual installation from source.
You can look up the latest supported version number `here <https://data.pyg.org/whl>`__.

Expand Down
4 changes: 2 additions & 2 deletions docs/source/install/quick-start.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@

<script>
var torchList = [
['torch-2.5.0', 'PyTorch 2.5.*'],
['torch-2.4.0', 'PyTorch 2.4.*'],
['torch-2.3.0', 'PyTorch 2.3.*'],
['torch-2.2.0', 'PyTorch 2.2.*'],
];

var osList = [
Expand Down Expand Up @@ -113,7 +113,7 @@
$("#command pre").text('# macOS binaries do not support CUDA');
}

else if (torch != "torch-2.4.0" && cuda == "cu124") {
else if (torch == "torch-2.3.0" && cuda == "cu124") {
$("#command pre").text('# PyTorch version does not support CUDA 12.4');
}

Expand Down
7 changes: 4 additions & 3 deletions examples/multi_gpu/distributed_sampling.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from math import ceil

import torch
import torch.distributed as dist
Expand Down Expand Up @@ -56,11 +57,11 @@ def run(rank, world_size, dataset):

# Split indices into `world_size` many chunks:
train_idx = data.train_mask.nonzero(as_tuple=False).view(-1)
train_idx = train_idx.split(train_idx.size(0) // world_size)[rank]
train_idx = train_idx.split(ceil(train_idx.size(0) / world_size))[rank]
val_idx = data.val_mask.nonzero(as_tuple=False).view(-1)
val_idx = val_idx.split(val_idx.size(0) // world_size)[rank]
val_idx = val_idx.split(ceil(val_idx.size(0) / world_size))[rank]
test_idx = data.val_mask.nonzero(as_tuple=False).view(-1)
test_idx = test_idx.split(test_idx.size(0) // world_size)[rank]
test_idx = test_idx.split(ceil(test_idx.size(0) / world_size))[rank]

kwargs = dict(
data=data,
Expand Down
3 changes: 2 additions & 1 deletion examples/multi_gpu/distributed_sampling_multinode.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import copy
import os
from math import ceil

import torch
import torch.distributed as dist
Expand Down Expand Up @@ -86,7 +87,7 @@ def run(world_size: int, rank: int, local_rank: int):

# Split training indices into `world_size` many chunks:
train_idx = data.train_mask.nonzero(as_tuple=False).view(-1)
train_idx = train_idx.split(train_idx.size(0) // world_size)[rank]
train_idx = train_idx.split(ceil(train_idx.size(0) / world_size))[rank]

kwargs = dict(batch_size=1024, num_workers=4, persistent_workers=True)
train_loader = NeighborLoader(
Expand Down
4 changes: 3 additions & 1 deletion examples/multi_gpu/pcqm4m_ogb.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Code adapted from OGB.
# https://github.com/snap-stanford/ogb/tree/master/examples/lsc/pcqm4m-v2
import argparse
import math
import os

import torch
Expand Down Expand Up @@ -433,7 +434,8 @@ def run(rank, dataset, args):
train_idx = split_idx["train"]

if num_devices > 1:
train_idx = train_idx.split(train_idx.size(0) // num_devices)[rank]
num_splits = math.ceil(train_idx.size(0) / num_devices)
train_idx = train_idx.split(num_splits)[rank]

if args.train_subset:
subset_ratio = 0.1
Expand Down
Loading

0 comments on commit 0b594f6

Please sign in to comment.