Skip to content

Commit 951dc31

Browse files
committed
Merge branch 'master' into gdc-sparse-topk-sparsification
2 parents 883e7d6 + c85e412 commit 951dc31

815 files changed

Lines changed: 28266 additions & 11621 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

Lines changed: 0 additions & 13 deletions
This file was deleted.

CONTRIBUTING.md renamed to .github/CONTRIBUTING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ If you are interested in contributing to PyG, your contributions will likely fal
55
1. You want to implement a new feature:
66
- In general, we accept any features as long as they fit the scope of this package. If you are unsure about this or need help on the design/implementation of your feature, post about it in an issue.
77
2. You want to fix a bug:
8-
- Feel free to send a Pull Request any time you encounter a bug. Please provide a clear and concise description of what the bug was. If you are unsure about if this is a bug at all or how to fix, post about it in an issue.
8+
- Feel free to send a Pull Request (PR) any time you encounter a bug. Please provide a clear and concise description of what the bug was. If you are unsure about if this is a bug at all or how to fix, post about it in an issue.
99

10-
Once you finish implementing a feature or bug-fix, please send a Pull Request to https://github.com/pyg-team/pytorch_geometric.
10+
Once you finish implementing a feature or bug-fix, please send a PR to https://github.com/pyg-team/pytorch_geometric.
11+
Your PR will be merged after one or more rounds of reviews by the [pyg-team](https://github.com/pyg-team).
12+
If your PR isn't merged anytime soon (*e.g.,* due to its large size, complexity or unavailability of reviewers), try moving your contribution to the [`torch_geometric.contrib`](https://pytorch-geometric.readthedocs.io/en/latest/modules/contrib.html) package.
13+
[`torch_geometric.contrib`](https://pytorch-geometric.readthedocs.io/en/latest/modules/contrib.html) has less rigourous review requirements and might lead to your PR getting merged faster.
1114

1215
## Developing PyG
1316

@@ -87,7 +90,7 @@ PyG uses [GitHub Actions](https://github.com/pyg-team/pytorch_geometric/actions)
8790

8891
Everytime you send a Pull Request, your commit will be built and checked against the PyG guidelines:
8992

90-
1. Ensure that your code is formatted correctly by testing against the styleguide of [`flake8`](https://github.com/PyCQA/flake8)://github.com/PyCQA/pycodestyle):
93+
1. Ensure that your code is formatted correctly by testing against the styleguide of [`flake8`](https://github.com/PyCQA/flake8):
9194

9295
```bash
9396
flake8 .

.github/actions/setup/action.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,58 @@ name: Setup
33
inputs:
44
python-version:
55
required: false
6-
default: '3.7'
6+
default: '3.8'
77
torch-version:
88
required: false
9-
default: '1.13.0'
9+
default: '2.0.0'
1010
cuda-version:
1111
required: false
1212
default: cpu
1313
torchvision-version:
1414
required: false
15-
default: '0.14.0'
15+
default: '0.15.0'
16+
full_install:
17+
required: false
18+
default: true
1619

1720
runs:
1821
using: composite
1922

2023
steps:
2124
- name: Set up Python ${{ inputs.python-version }}
22-
uses: actions/setup-python@v4
25+
uses: actions/setup-python@v4.3.0
2326
with:
2427
python-version: ${{ inputs.python-version }}
28+
check-latest: true
29+
cache: pip
30+
cache-dependency-path: |
31+
pyproject.toml
32+
33+
- name: Install PyTorch ${{ inputs.torch-version }}+${{ inputs.cuda-version }}
34+
if: ${{ inputs.torch-version != 'nightly' }}
35+
run: |
36+
pip install torch==${{ inputs.torch-version }} --extra-index-url https://download.pytorch.org/whl/${{ inputs.cuda-version }}
37+
python -c "import torch; print('PyTorch:', torch.__version__)"
38+
python -c "import torch; print('CUDA:', torch.version.cuda)"
39+
shell: bash
2540

2641
- name: Install PyTorch ${{ inputs.torch-version }}+${{ inputs.cuda-version }}
42+
if: ${{ inputs.torch-version == 'nightly' }}
2743
run: |
28-
pip install torch==${{ inputs.torch-version }} torchvision==${{ inputs.torchvision-version }} --extra-index-url https://download.pytorch.org/whl/${{ inputs.cuda-version }}
44+
pip install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/${{ inputs.cuda-version }}
2945
python -c "import torch; print('PyTorch:', torch.__version__)"
3046
python -c "import torch; print('CUDA:', torch.version.cuda)"
3147
shell: bash
3248

3349
- name: Install extension packages
50+
if: ${{ inputs.full_install == 'true' && inputs.torch-version != 'nightly' }}
3451
run: |
52+
pip install torchvision==${{ inputs.torchvision-version }} --extra-index-url https://download.pytorch.org/whl/${{ inputs.cuda-version }}
3553
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-${{ inputs.torch-version }}+${{ inputs.cuda-version }}.html
3654
shell: bash
3755

38-
- name: Install pyg-lib
39-
if: ${{ runner.os == 'Linux' }} # pyg-lib is currently only available on Linux.
56+
- name: Install pyg-lib # pyg-lib is currently only available on Linux.
57+
if: ${{ inputs.full_install == 'true' && inputs.torch-version != 'nightly' && runner.os == 'Linux' }}
4058
run: |
4159
pip install pyg-lib -f https://data.pyg.org/whl/nightly/torch-${{ inputs.torch-version }}+${{ inputs.cuda-version }}.html
4260
shell: bash

.github/labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ transform:
2929
utils:
3030
- torch_geometric/utils/**/*
3131

32+
contrib:
33+
- torch_geometric/contrib/**/*
34+
3235
graphgym:
3336
- graphgym/**/*
3437
- torch_geometric/graphgym/**/*

.github/workflows/building_pyg_conda.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,36 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
# We have trouble building for Windows - drop for now.
14-
os: [ubuntu-18.04, macos-10.15] # windows-2019
15-
python-version: ['3.7', '3.8', '3.9', '3.10']
16-
torch-version: [1.12.0, 1.13.0]
17-
cuda-version: ['cpu', 'cu102', 'cu113', 'cu116', 'cu117']
13+
os: [ubuntu-18.04, macos-10.15, windows-2019]
14+
# We have troube building for Python 3.11 due to version conflicts.
15+
python-version: ['3.7', '3.8', '3.9', '3.10'] # '3.11'
16+
torch-version: [1.12.0, 1.13.0, 2.0.0]
17+
cuda-version: ['cpu', 'cu102', 'cu113', 'cu116', 'cu117', 'cu118']
1818
exclude:
19+
- torch-version: 1.12.0
20+
python-version: '3.11'
1921
- torch-version: 1.12.0
2022
cuda-version: 'cu117'
23+
- torch-version: 1.12.0
24+
cuda-version: 'cu118'
25+
- torch-version: 1.13.0
26+
python-version: '3.11'
2127
- torch-version: 1.13.0
2228
cuda-version: 'cu102'
2329
- torch-version: 1.13.0
2430
cuda-version: 'cu113'
31+
- torch-version: 1.13.0
32+
cuda-version: 'cu118'
33+
- torch-version: 2.0.0
34+
python-version: '3.7'
35+
- torch-version: 2.0.0
36+
cuda-version: 'cu102'
37+
- torch-version: 2.0.0
38+
cuda-version: 'cu113'
39+
- torch-version: 2.0.0
40+
cuda-version: 'cu115'
41+
- torch-version: 2.0.0
42+
cuda-version: 'cu116'
2543
- os: macos-10.15
2644
cuda-version: 'cu102'
2745
- os: macos-10.15
@@ -30,8 +48,8 @@ jobs:
3048
cuda-version: 'cu116'
3149
- os: macos-10.15
3250
cuda-version: 'cu117'
33-
- os: windows-2019
34-
cuda-version: 'cu102'
51+
- os: macos-10.15
52+
cuda-version: 'cu118'
3553

3654
steps:
3755
- name: Checkout repository

.github/workflows/building_rusty1s_conda.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,36 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
# We have trouble building for Windows - drop for now.
14-
os: [ubuntu-18.04, macos-10.15] # windows-2019
15-
python-version: ['3.7', '3.8', '3.9', '3.10']
16-
torch-version: [1.12.0, 1.13.0]
17-
cuda-version: ['cpu', 'cu102', 'cu113', 'cu116', 'cu117']
13+
os: [ubuntu-18.04, macos-10.15, windows-2019]
14+
# We have troube building for Python 3.11 due to version conflicts.
15+
python-version: ['3.7', '3.8', '3.9', '3.10'] # '3.11'
16+
torch-version: [1.12.0, 1.13.0, 2.0.0]
17+
cuda-version: ['cpu', 'cu102', 'cu113', 'cu116', 'cu117', 'cu118']
1818
exclude:
19+
- torch-version: 1.12.0
20+
python-version: '3.11'
1921
- torch-version: 1.12.0
2022
cuda-version: 'cu117'
23+
- torch-version: 1.12.0
24+
cuda-version: 'cu118'
25+
- torch-version: 1.13.0
26+
python-version: '3.11'
2127
- torch-version: 1.13.0
2228
cuda-version: 'cu102'
2329
- torch-version: 1.13.0
2430
cuda-version: 'cu113'
31+
- torch-version: 1.13.0
32+
cuda-version: 'cu118'
33+
- torch-version: 2.0.0
34+
python-version: '3.7'
35+
- torch-version: 2.0.0
36+
cuda-version: 'cu102'
37+
- torch-version: 2.0.0
38+
cuda-version: 'cu113'
39+
- torch-version: 2.0.0
40+
cuda-version: 'cu115'
41+
- torch-version: 2.0.0
42+
cuda-version: 'cu116'
2543
- os: macos-10.15
2644
cuda-version: 'cu102'
2745
- os: macos-10.15
@@ -30,8 +48,8 @@ jobs:
3048
cuda-version: 'cu116'
3149
- os: macos-10.15
3250
cuda-version: 'cu117'
33-
- os: windows-2019
34-
cuda-version: 'cu102'
51+
- os: macos-10.15
52+
cuda-version: 'cu118'
3553

3654
steps:
3755
- name: Checkout repository

.github/workflows/documentation.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ jobs:
2828
docker/**
2929
examples/**
3030
graphgym/**
31+
README.md
3132
CHANGELOG.md
3233
3334
- name: Setup packages
3435
if: steps.changed-files-specific.outputs.only_changed != 'true'
3536
uses: ./.github/actions/setup
3637
with:
37-
python-version: 3.8
38+
full_install: false
3839

3940
- name: Install main package
4041
if: steps.changed-files-specific.outputs.only_changed != 'true'

.github/workflows/examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242

4343
- name: Run GNNExplainer
4444
run: |
45-
python examples/gnn_explainer.py
45+
python examples/explain/gnn_explainer.py

.github/workflows/full_testing.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ubuntu-latest, windows-latest]
18-
python-version: ['3.7', '3.8', '3.9', '3.10']
18+
python-version: ['3.8', '3.10']
19+
torch-version: [1.13.0, 2.0.0, nightly]
20+
include:
21+
- torch-version: 1.13.0
22+
torchvision-version: 0.14.0
23+
- torch-version: 2.0.0
24+
torchvision-version: 0.15.0
25+
- torch-version: nightly
26+
torchvision-version: nightly
1927

2028
steps:
2129
- name: Checkout repository
@@ -25,6 +33,8 @@ jobs:
2533
uses: ./.github/actions/setup
2634
with:
2735
python-version: ${{ matrix.python-version }}
36+
torch-version: ${{ matrix.torch-version }}
37+
torchvision-version: ${{ matrix.torchvision-version }}
2838

2939
- name: Install graphviz
3040
if: ${{ runner.os == 'Linux' }}
@@ -38,8 +48,7 @@ jobs:
3848
- name: Run tests
3949
run: |
4050
FULL_TEST=1 pytest --cov --cov-report=xml
41-
shell:
42-
bash
51+
shell: bash
4352

4453
- name: Upload coverage
4554
uses: codecov/codecov-action@v2

.github/workflows/install.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,23 @@ jobs:
2929
docs/**
3030
examples/**
3131
graphgym/**
32+
README.md
3233
CHANGELOG.md
3334
3435
- name: Setup packages
3536
if: steps.changed-files-specific.outputs.only_changed != 'true'
3637
uses: ./.github/actions/setup
38+
with:
39+
full_install: false
3740

3841
- name: Install main package
3942
if: steps.changed-files-specific.outputs.only_changed != 'true'
4043
run: |
41-
pip install -e .[test]
44+
pip install -e .
4245
4346
- name: Test imports
4447
if: steps.changed-files-specific.outputs.only_changed != 'true'
4548
run: |
4649
python -c "import torch_geometric"
47-
python -c "import torch_geometric.datasets"
48-
python -c "import torch_geometric.nn"
50+
python -c "import torch_geometric.contrib"
4951
python -c "import torch_geometric.graphgym"
50-
51-
- name: Run tests
52-
if: steps.changed-files-specific.outputs.only_changed != 'true'
53-
run: |
54-
pytest

0 commit comments

Comments
 (0)