Skip to content

Commit

Permalink
Merge branch 'master' into affinity_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s authored Mar 20, 2023
2 parents 092a505 + 06ac5a4 commit c3e725f
Show file tree
Hide file tree
Showing 132 changed files with 2,318 additions and 980 deletions.
17 changes: 11 additions & 6 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ name: Setup
inputs:
python-version:
required: false
default: '3.7'
default: '3.8'
torch-version:
required: false
default: '1.13.0'
default: '2.0.0'
cuda-version:
required: false
default: cpu
torchvision-version:
required: false
default: '0.14.0'
default: '0.15.0'
full_install:
required: false
default: true

runs:
using: composite
Expand All @@ -29,18 +32,20 @@ runs:
- name: Install PyTorch ${{ inputs.torch-version }}+${{ inputs.cuda-version }}
run: |
pip install torch==${{ inputs.torch-version }} torchvision==${{ inputs.torchvision-version }} --extra-index-url https://download.pytorch.org/whl/${{ inputs.cuda-version }}
pip install torch==${{ inputs.torch-version }} --extra-index-url https://download.pytorch.org/whl/${{ inputs.cuda-version }}
python -c "import torch; print('PyTorch:', torch.__version__)"
python -c "import torch; print('CUDA:', torch.version.cuda)"
shell: bash

- name: Install extension packages
if: ${{ inputs.full_install == 'true' }}
run: |
pip install torchvision==${{ inputs.torchvision-version }} --extra-index-url https://download.pytorch.org/whl/${{ inputs.cuda-version }}
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
shell: bash

- name: Install pyg-lib
if: ${{ runner.os == 'Linux' }} # pyg-lib is currently only available on Linux.
- name: Install pyg-lib # pyg-lib is currently only available on Linux.
if: ${{ inputs.full_install == 'true' && runner.os == 'Linux' }}
run: |
pip install pyg-lib -f https://data.pyg.org/whl/nightly/torch-${{ inputs.torch-version }}+${{ inputs.cuda-version }}.html
shell: bash
28 changes: 23 additions & 5 deletions .github/workflows/building_pyg_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,34 @@ jobs:
matrix:
# We have trouble building for Windows - drop for now.
os: [ubuntu-18.04, macos-10.15] # windows-2019
python-version: ['3.7', '3.8', '3.9', '3.10']
torch-version: [1.12.0, 1.13.0]
cuda-version: ['cpu', 'cu102', 'cu113', 'cu116', 'cu117']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
torch-version: [1.12.0, 1.13.0, 2.0.0]
cuda-version: ['cpu', 'cu102', 'cu113', 'cu116', 'cu117', 'cu118']
exclude:
- torch-version: 1.12.0
python-version: '3.11'
- torch-version: 1.12.0
cuda-version: 'cu117'
- torch-version: 1.12.0
cuda-version: 'cu118'
- torch-version: 1.13.0
python-version: '3.11'
- torch-version: 1.13.0
cuda-version: 'cu102'
- torch-version: 1.13.0
cuda-version: 'cu113'
- torch-version: 1.13.0
cuda-version: 'cu118'
- torch-version: 2.0.0
python-version: '3.7'
- torch-version: 2.0.0
cuda-version: 'cu102'
- torch-version: 2.0.0
cuda-version: 'cu113'
- torch-version: 2.0.0
cuda-version: 'cu115'
- torch-version: 2.0.0
cuda-version: 'cu116'
- os: macos-10.15
cuda-version: 'cu102'
- os: macos-10.15
Expand All @@ -30,8 +48,8 @@ jobs:
cuda-version: 'cu116'
- os: macos-10.15
cuda-version: 'cu117'
- os: windows-2019
cuda-version: 'cu102'
- os: macos-10.15
cuda-version: 'cu118'

steps:
- name: Checkout repository
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/building_rusty1s_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,34 @@ jobs:
matrix:
# We have trouble building for Windows - drop for now.
os: [ubuntu-18.04, macos-10.15] # windows-2019
python-version: ['3.7', '3.8', '3.9', '3.10']
torch-version: [1.12.0, 1.13.0]
cuda-version: ['cpu', 'cu102', 'cu113', 'cu116', 'cu117']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
torch-version: [1.12.0, 1.13.0, 2.0.0]
cuda-version: ['cpu', 'cu102', 'cu113', 'cu116', 'cu117', 'cu118']
exclude:
- torch-version: 1.12.0
python-version: '3.11'
- torch-version: 1.12.0
cuda-version: 'cu117'
- torch-version: 1.12.0
cuda-version: 'cu118'
- torch-version: 1.13.0
python-version: '3.11'
- torch-version: 1.13.0
cuda-version: 'cu102'
- torch-version: 1.13.0
cuda-version: 'cu113'
- torch-version: 1.13.0
cuda-version: 'cu118'
- torch-version: 2.0.0
python-version: '3.7'
- torch-version: 2.0.0
cuda-version: 'cu102'
- torch-version: 2.0.0
cuda-version: 'cu113'
- torch-version: 2.0.0
cuda-version: 'cu115'
- torch-version: 2.0.0
cuda-version: 'cu116'
- os: macos-10.15
cuda-version: 'cu102'
- os: macos-10.15
Expand All @@ -30,8 +48,8 @@ jobs:
cuda-version: 'cu116'
- os: macos-10.15
cuda-version: 'cu117'
- os: windows-2019
cuda-version: 'cu102'
- os: macos-10.15
cuda-version: 'cu118'

steps:
- name: Checkout repository
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ jobs:
if: steps.changed-files-specific.outputs.only_changed != 'true'
uses: ./.github/actions/setup
with:
python-version: 3.8
cache: pip
cache-dependency-path: |
setup.py
full_install: false

- name: Install main package
if: steps.changed-files-specific.outputs.only_changed != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/full_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10']

steps:
- name: Checkout repository
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,17 @@ jobs:
- name: Setup packages
if: steps.changed-files-specific.outputs.only_changed != 'true'
uses: ./.github/actions/setup
with:
full_install: false

- name: Install main package
if: steps.changed-files-specific.outputs.only_changed != 'true'
run: |
pip install -e .[test]
pip install -e .
- name: Test imports
if: steps.changed-files-specific.outputs.only_changed != 'true'
run: |
python -c "import torch_geometric"
python -c "import torch_geometric.datasets"
python -c "import torch_geometric.nn"
python -c "import torch_geometric.contrib"
python -c "import torch_geometric.graphgym"
- name: Run tests
if: steps.changed-files-specific.outputs.only_changed != 'true'
run: |
pytest
6 changes: 4 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:

- name: Setup packages
uses: ./.github/actions/setup
with:
full_install: false

- name: Install pyright
run: |
Expand All @@ -37,7 +39,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4.3.0
with:
python-version: 3.7
python-version: 3.8
check-latest: true
cache: pip
cache-dependency-path: |
Expand All @@ -60,7 +62,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4.3.0
with:
python-version: 3.7
python-version: 3.8
check-latest: true
cache: pip
cache-dependency-path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4.3.0
with:
python-version: 3.7
python-version: 3.8
check-latest: true
cache: pip
cache-dependency-path: |
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/prev_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Testing PyTorch 1.13

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

jobs:

prev_pytest:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 40

# Skip workflow if only certain files have been changed.
- name: Get changed files
id: changed-files-specific
uses: tj-actions/changed-files@v34
with:
files: |
benchmark/**
conda/**
docker/**
docs/**
examples/**
graphgym/**
CHANGELOG.md
- name: Setup packages
if: steps.changed-files-specific.outputs.only_changed != 'true'
uses: ./.github/actions/setup
with:
torch-version: 1.13.0
torchvision-version: 0.14.0

- name: Install main package
if: steps.changed-files-specific.outputs.only_changed != 'true'
run: |
pip install -e .[full,test]
- name: Run tests
if: steps.changed-files-specific.outputs.only_changed != 'true'
run: |
pytest
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Testing
name: Testing PyTorch 2.0

on: # yamllint disable-line rule:truthy
push:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ coverage.xml
*.out
*.pt
*.onnx
examples/*.png
examples/*.pdf
examples/**/*.png
examples/**/*.pdf
benchmark/results/

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

### Added

- Added the `DistMult` KGE model ([#6958](https://github.com/pyg-team/pytorch_geometric/pull/6958))
- Added `HeteroData.set_value_dict` functionality ([#6961](https://github.com/pyg-team/pytorch_geometric/pull/6961), [#6974](https://github.com/pyg-team/pytorch_geometric/pull/6974))
- Added PyTorch >= 2.0 support ([#6934](https://github.com/pyg-team/pytorch_geometric/pull/6934))
- Added PyTorch Lightning >= 2.0 support ([#6929](https://github.com/pyg-team/pytorch_geometric/pull/6929))
- Added the `ComplEx` KGE model ([#6898](https://github.com/pyg-team/pytorch_geometric/pull/6898))
- Added option to write benchmark results to csv ([#6888](https://github.com/pyg-team/pytorch_geometric/pull/6888))
- Added `HeteroLayerNorm` and `HeteroBatchNorm` layers ([#6838](https://github.com/pyg-team/pytorch_geometric/pull/6838))
- Added the `HeterophilousGraphDataset` suite ([#6846](https://github.com/pyg-team/pytorch_geometric/pull/6846))
Expand All @@ -29,7 +34,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `Pad` transform ([#5940](https://github.com/pyg-team/pytorch_geometric/pull/5940), [#6697](https://github.com/pyg-team/pytorch_geometric/pull/6697), [#6731](https://github.com/pyg-team/pytorch_geometric/pull/6731), [#6758](https://github.com/pyg-team/pytorch_geometric/pull/6758))
- Added full batch mode to the inference benchmark ([#6631](https://github.com/pyg-team/pytorch_geometric/pull/6631))
- Added `cat` aggregation type to the `HeteroConv` class so that features can be concatenated during grouping ([#6634](https://github.com/pyg-team/pytorch_geometric/pull/6634))
- Added `torch.compile` support and benchmark study ([#6610](https://github.com/pyg-team/pytorch_geometric/pull/6610))
- Added `torch.compile` support and benchmark study ([#6610](https://github.com/pyg-team/pytorch_geometric/pull/6610), [#6952](https://github.com/pyg-team/pytorch_geometric/pull/6952), [#6953](https://github.com/pyg-team/pytorch_geometric/pull/6953))
- Added the `AntiSymmetricConv` layer ([#6577](https://github.com/pyg-team/pytorch_geometric/pull/6577))
- Added a mixin for Huggingface model hub integration ([#5930](https://github.com/pyg-team/pytorch_geometric/pull/5930), [#6591](https://github.com/pyg-team/pytorch_geometric/pull/6591))
- Added support for accelerated GNN layers in `nn.conv.cugraph` via `cugraph-ops` ([#6278](https://github.com/pyg-team/pytorch_geometric/pull/6278), [#6388](https://github.com/pyg-team/pytorch_geometric/pull/6388), [#6412](https://github.com/pyg-team/pytorch_geometric/pull/6412))
Expand All @@ -55,7 +60,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Warn on using latest documentation ([#6418](https://github.com/pyg-team/pytorch_geometric/pull/6418))
- Added basic `pyright` type checker support ([#6415](https://github.com/pyg-team/pytorch_geometric/pull/6415))
- Added a new external resource for link prediction ([#6396](https://github.com/pyg-team/pytorch_geometric/pull/6396))
- Added `CaptumExplainer` ([#6383](https://github.com/pyg-team/pytorch_geometric/pull/6383), [#6387](https://github.com/pyg-team/pytorch_geometric/pull/6387), [#6433](https://github.com/pyg-team/pytorch_geometric/pull/6433), [#6487](https://github.com/pyg-team/pytorch_geometric/pull/6487))
- Added `CaptumExplainer` ([#6383](https://github.com/pyg-team/pytorch_geometric/pull/6383), [#6387](https://github.com/pyg-team/pytorch_geometric/pull/6387), [#6433](https://github.com/pyg-team/pytorch_geometric/pull/6433), [#6487](https://github.com/pyg-team/pytorch_geometric/pull/6487), [#6966](https://github.com/pyg-team/pytorch_geometric/pull/6966))
- Added support for custom `HeteroData` mini-batch class in remote backends ([#6377](https://github.com/pyg-team/pytorch_geometric/pull/6377))
- Added the `GNNFF` model ([#5866](https://github.com/pyg-team/pytorch_geometric/pull/5866))
- Added `MLPAggregation`, `SetTransformerAggregation`, `GRUAggregation`, and `DeepSetsAggregation` as adaptive readout functions ([#6301](https://github.com/pyg-team/pytorch_geometric/pull/6301), [#6336](https://github.com/pyg-team/pytorch_geometric/pull/6336), [#6338](https://github.com/pyg-team/pytorch_geometric/pull/6338))
Expand Down Expand Up @@ -92,7 +97,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `Data.edge_subgraph` and `HeteroData.edge_subgraph` functionalities ([#6193](https://github.com/pyg-team/pytorch_geometric/pull/6193))
- Added `input_time` option to `LightningNodeData` and `transform_sampler_output` to `NodeLoader` and `LinkLoader` ([#6187](https://github.com/pyg-team/pytorch_geometric/pull/6187))
- Added `summary` for PyG/PyTorch models ([#5859](https://github.com/pyg-team/pytorch_geometric/pull/5859), [#6161](https://github.com/pyg-team/pytorch_geometric/pull/6161))
- Started adding `torch.sparse` support to PyG ([#5906](https://github.com/pyg-team/pytorch_geometric/pull/5906), [#5944](https://github.com/pyg-team/pytorch_geometric/pull/5944), [#6003](https://github.com/pyg-team/pytorch_geometric/pull/6003), [#6033](https://github.com/pyg-team/pytorch_geometric/pull/6033), [#6514](https://github.com/pyg-team/pytorch_geometric/pull/6514), [#6532](https://github.com/pyg-team/pytorch_geometric/pull/6532), [#6748](https://github.com/pyg-team/pytorch_geometric/pull/6748), [#6847](https://github.com/pyg-team/pytorch_geometric/pull/6847), [#6868](https://github.com/pyg-team/pytorch_geometric/pull/6868), [#6874](https://github.com/pyg-team/pytorch_geometric/pull/6874))
- Started adding `torch.sparse` support to PyG ([#5906](https://github.com/pyg-team/pytorch_geometric/pull/5906), [#5944](https://github.com/pyg-team/pytorch_geometric/pull/5944), [#6003](https://github.com/pyg-team/pytorch_geometric/pull/6003), [#6033](https://github.com/pyg-team/pytorch_geometric/pull/6033), [#6514](https://github.com/pyg-team/pytorch_geometric/pull/6514), [#6532](https://github.com/pyg-team/pytorch_geometric/pull/6532), [#6748](https://github.com/pyg-team/pytorch_geometric/pull/6748), [#6847](https://github.com/pyg-team/pytorch_geometric/pull/6847), [#6868](https://github.com/pyg-team/pytorch_geometric/pull/6868), [#6874](https://github.com/pyg-team/pytorch_geometric/pull/6874), [#6897](https://github.com/pyg-team/pytorch_geometric/pull/6897), [#6930](https://github.com/pyg-team/pytorch_geometric/pull/6930), [#6932](https://github.com/pyg-team/pytorch_geometric/pull/6932), [#6936](https://github.com/pyg-team/pytorch_geometric/pull/6936), [#6937](https://github.com/pyg-team/pytorch_geometric/pull/6937), [#6939](https://github.com/pyg-team/pytorch_geometric/pull/6939), [#6947](https://github.com/pyg-team/pytorch_geometric/pull/6947), [#6950](https://github.com/pyg-team/pytorch_geometric/pull/6950), [#6951](https://github.com/pyg-team/pytorch_geometric/pull/6951), [#6957](https://github.com/pyg-team/pytorch_geometric/pull/6957))
- Add `inputs_channels` back in training benchmark ([#6154](https://github.com/pyg-team/pytorch_geometric/pull/6154))
- Added support for dropping nodes in `utils.to_dense_batch` in case `max_num_nodes` is smaller than the number of nodes ([#6124](https://github.com/pyg-team/pytorch_geometric/pull/6124))
- Added the RandLA-Net architecture as an example ([#5117](https://github.com/pyg-team/pytorch_geometric/pull/5117))
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ Unlike simple stacking of GNN layers, these models could involve pre-processing,
* **[LINKX](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.LINKX.html)** from Lim *et al.*: [Large Scale Learning on Non-Homophilous Graphs:
New Benchmarks and Strong Simple Methods](https://arxiv.org/abs/2110.14446) (NeurIPS 2021) [[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/linkx.py)]
* **[RevGNN](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.GroupAddRev.html)** from Li *et al.*: [Training Graph Neural with 1000 Layers](https://arxiv.org/abs/2106.07476) (ICML 2021) [[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/rev_gnn.py)]
* **[TransE](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.kge.TransE.html)** from Bordes *et al.*: [Translating Embeddings for Modeling Multi-Relational Data](https://proceedings.neurips.cc/paper/2013/file/1cecc7a77928ca8133fa24680a88d2f9-Paper.pdf) (NIPS 2013) [[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/transe_fb15k_237.py)]
* **[TransE](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.kge.TransE.html)** from Bordes *et al.*: [Translating Embeddings for Modeling Multi-Relational Data](https://proceedings.neurips.cc/paper/2013/file/1cecc7a77928ca8133fa24680a88d2f9-Paper.pdf) (NIPS 2013) [[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/kge_fb15k_237.py)]
* **[ComplEx](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.kge.ComplEx.html)** from Trouillon *et al.*: [Complex Embeddings for Simple Link Prediction](https://arxiv.org/abs/1606.06357) (ICML 2016) [[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/kge_fb15k_237.py)]
* **[DistMult](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.kge.DistMult.html)** from Yang *et al.*: [Embedding Entities and Relations for Learning and Inference in Knowledge Bases](https://arxiv.org/abs/1412.6575) (ICLR 2015) [[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/kge_fb15k_237.py)]
</details>

**GNN operators and utilities:**
Expand Down
Loading

0 comments on commit c3e725f

Please sign in to comment.