diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c795b05 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/pytorch_geometric-2.5.3/benchmark/multi_gpu/training/README.md b/pytorch_geometric-2.5.3/benchmark/multi_gpu/training/README.md deleted file mode 100644 index 2b440fb..0000000 --- a/pytorch_geometric-2.5.3/benchmark/multi_gpu/training/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Training Benchmark - -## Running benchmark on CUDA GPU - -Run benchmark, e.g. assuming you have `n` NVIDIA GPUs: - -``` -python training_benchmark_cuda.py --dataset ogbn-products --model edge_cnn --num-epochs 3 --n_gpus -``` - -## Running benchmark on Intel GPU - -## Environment setup - -``` -install intel_extension_for_pytorch -install oneccl_bindings_for_pytorch -``` - -Run benchmark, e.g. assuming you have `n` XPUs: - -``` -mpirun -np python training_benchmark_xpu.py --dataset ogbn-products --model edge_cnn --num-epochs 3 -``` diff --git a/pytorch_geometric-2.5.3/examples/distributed/pyg/run_dist.sh b/pytorch_geometric-2.5.3/examples/distributed/pyg/run_dist.sh deleted file mode 100644 index 18e6c4a..0000000 --- a/pytorch_geometric-2.5.3/examples/distributed/pyg/run_dist.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -CONDA_ENV=/home/XXX/anaconda3/envs/pyg -PYG_WORKSPACE=$PWD -PY_EXEC=${CONDA_ENV}/bin/python -EXEC_SCRIPT=${PYG_WORKSPACE}/node_ogb_cpu.py - -# Node number: -NUM_NODES=2 - -# Dataset folder: -DATASET_ROOT_DIR="/home/XXX/mag/2-parts" - -# Dataset name: -DATASET=ogbn-mag - -# Number of epochs: -NUM_EPOCHS=3 - -# The batch size: -BATCH_SIZE=1024 - -# Number of workers for sampling: -NUM_WORKERS=2 -CONCURRENCY=2 - -# Partition data directory: -PART_CONFIG="/home/XXX/mag/2-parts/ogbn-products-partitions/META.json" -NUM_PARTS=2 - -DDP_PORT=12351 - -# Fanout per layer: -NUM_NEIGHBORS="15,10,5" - -# IP configuration path: -IP_CONFIG=${PYG_WORKSPACE}/ip_config.yaml - -# Folder and filename to place logs: -logdir="logs" -mkdir -p "logs" -logname=log_${DATASET}_${NUM_PARTS}_$RANDOM -echo $logname -set -x - -# stdout stored in `/logdir/logname.out`. -python launch.py --workspace "${PYG_WORKSPACE}" --num_nodes ${NUM_NODES} --num_neighbors ${NUM_NEIGHBORS} --dataset_root_dir ${DATASET_ROOT_DIR} --dataset ${DATASET} --num_epochs ${NUM_EPOCHS} --batch_size ${BATCH_SIZE} --num_workers ${NUM_WORKERS} --concurrency ${CONCURRENCY} --ddp_port ${DDP_PORT} --part_config ${PART_CONFIG} --ip_config "${IP_CONFIG}" "cd /home/XXX; source ${CONDA_ENV}/bin/activate; cd ${PYG_WORKSPACE}; ${PY_EXEC} ${EXEC_SCRIPT}" |& tee ${logdir}/${logname}.txt -set +x diff --git a/pytorch_geometric-2.5.3/examples/multi_gpu/papers100m_gcn.py b/pytorch_geometric-2.5.3/examples/multi_gpu/papers100m_gcn.py deleted file mode 100644 index 89233ae..0000000 --- a/pytorch_geometric-2.5.3/examples/multi_gpu/papers100m_gcn.py +++ /dev/null @@ -1,142 +0,0 @@ -import os -import time - -import torch -import torch.distributed as dist -import torch.multiprocessing as mp -import torch.nn.functional as F -from ogb.nodeproppred import PygNodePropPredDataset -from torch.nn.parallel import DistributedDataParallel - -from torch_geometric.loader import NeighborLoader -from torch_geometric.nn import GCNConv - - -def get_num_workers(world_size: int) -> int: - num_workers = None - if hasattr(os, "sched_getaffinity"): - try: - num_workers = len(os.sched_getaffinity(0)) // (2 * world_size) - except Exception: - pass - if num_workers is None: - num_workers = os.cpu_count() // (2 * world_size) - return num_workers - - -class GCN(torch.nn.Module): - def __init__(self, in_channels, hidden_channels, out_channels): - super().__init__() - self.conv1 = GCNConv(in_channels, hidden_channels) - self.conv2 = GCNConv(hidden_channels, out_channels) - - def forward(self, x, edge_index=None): - x = F.dropout(x, p=0.5, training=self.training) - x = self.conv1(x, edge_index).relu() - x = F.dropout(x, p=0.5, training=self.training) - x = self.conv2(x, edge_index) - return x - - -def run(rank, world_size, data, split_idx, model): - os.environ['MASTER_ADDR'] = 'localhost' - os.environ['MASTER_PORT'] = '12355' - dist.init_process_group('nccl', rank=rank, world_size=world_size) - - split_idx['train'] = split_idx['train'].split( - split_idx['train'].size(0) // world_size, - dim=0, - )[rank].clone() - - model = DistributedDataParallel(model.to(rank), device_ids=[rank]) - optimizer = torch.optim.Adam(model.parameters(), lr=0.01) - - kwargs = dict( - data=data, - batch_size=128, - num_workers=get_num_workers(world_size), - num_neighbors=[50, 50], - ) - train_loader = NeighborLoader( - input_nodes=split_idx['train'], - shuffle=True, - **kwargs, - ) - if rank == 0: - val_loader = NeighborLoader(input_nodes=split_idx['valid'], **kwargs) - test_loader = NeighborLoader(input_nodes=split_idx['test'], **kwargs) - - val_steps = 1000 - warmup_steps = 100 - if rank == 0: - print("Beginning training...") - - for epoch in range(1, 4): - model.train() - for i, batch in enumerate(train_loader): - if i == warmup_steps: - start = time.time() - batch = batch.to(rank) - optimizer.zero_grad() - y = batch.y[:batch.batch_size].view(-1).to(torch.long) - out = model(batch.x, batch.edge_index)[:batch.batch_size] - loss = F.cross_entropy(out, y) - loss.backward() - optimizer.step() - - if rank == 0 and i % 10 == 0: - print(f'Epoch: {epoch:02d}, Iteration: {i}, Loss: {loss:.4f}') - - if rank == 0: - sec_per_iter = (time.time() - start) / (i - warmup_steps) - print(f"Avg Training Iteration Time: {sec_per_iter:.6f} s/iter") - - model.eval() - total_correct = total_examples = 0 - for i, batch in enumerate(val_loader): - if i >= val_steps: - break - if i == warmup_steps: - start = time.time() - - batch = batch.to(rank) - with torch.no_grad(): - out = model(batch.x, batch.edge_index)[:batch.batch_size] - pred = out.argmax(dim=-1) - y = batch.y[:batch.batch_size].view(-1).to(torch.long) - - total_correct += int((pred == y).sum()) - total_examples += y.size(0) - - print(f"Val Acc: {total_correct / total_examples:.4f}") - sec_per_iter = (time.time() - start) / (i - warmup_steps) - print(f"Avg Inference Iteration Time: {sec_per_iter:.6f} s/iter") - - if rank == 0: - model.eval() - total_correct = total_examples = 0 - for i, batch in enumerate(test_loader): - batch = batch.to(rank) - with torch.no_grad(): - out = model(batch.x, batch.edge_index)[:batch.batch_size] - pred = out.argmax(dim=-1) - y = batch.y[:batch.batch_size].view(-1).to(torch.long) - - total_correct += int((pred == y).sum()) - total_examples += y.size(0) - print(f"Test Acc: {total_correct / total_examples:.4f}") - - -if __name__ == '__main__': - dataset = PygNodePropPredDataset(name='ogbn-papers100M') - split_idx = dataset.get_idx_split() - model = GCN(dataset.num_features, 64, dataset.num_classes) - - world_size = torch.cuda.device_count() - print('Let\'s use', world_size, 'GPUs!') - mp.spawn( - run, - args=(world_size, dataset[0], split_idx, model), - nprocs=world_size, - join=True, - ) diff --git a/pytorch_geometric-2.5.3/examples/ogbn_papers_100m.py b/pytorch_geometric-2.5.3/examples/ogbn_papers_100m.py deleted file mode 100644 index 68812d0..0000000 --- a/pytorch_geometric-2.5.3/examples/ogbn_papers_100m.py +++ /dev/null @@ -1,99 +0,0 @@ -import os -import time -from typing import Optional - -import torch -import torch.nn.functional as F -from ogb.nodeproppred import PygNodePropPredDataset - -from torch_geometric.loader import NeighborLoader -from torch_geometric.nn import GCNConv - -device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') - -dataset = PygNodePropPredDataset(name='ogbn-papers100M') -split_idx = dataset.get_idx_split() - - -def get_num_workers() -> int: - try: - return len(os.sched_getaffinity(0)) // 2 - except Exception: - return os.cpu_count() // 2 - - -kwargs = dict( - data=dataset[0], - num_neighbors=[50, 50], - batch_size=128, - num_workers=get_num_workers(), -) -train_loader = NeighborLoader(input_nodes=split_idx['train'], shuffle=True, - **kwargs) -val_loader = NeighborLoader(input_nodes=split_idx['valid'], **kwargs) -test_loader = NeighborLoader(input_nodes=split_idx['test'], **kwargs) - - -class GCN(torch.nn.Module): - def __init__(self, in_channels, hidden_channels, out_channels): - super().__init__() - self.conv1 = GCNConv(in_channels, hidden_channels) - self.conv2 = GCNConv(hidden_channels, out_channels) - - def forward(self, x, edge_index): - x = F.dropout(x, p=0.5, training=self.training) - x = self.conv1(x, edge_index).relu() - x = F.dropout(x, p=0.5, training=self.training) - x = self.conv2(x, edge_index) - return x - - -model = GCN(dataset.num_features, 64, dataset.num_classes).to(device) -optimizer = torch.optim.Adam(model.parameters(), lr=0.01, weight_decay=0.0005) - - -def train(): - model.train() - - for i, batch in enumerate(train_loader): - start = time.perf_counter() - batch = batch.to(device) - optimizer.zero_grad() - out = model(batch.x, batch.edge_index)[:batch.batch_size] - y = batch.y[:batch.batch_size].view(-1).to(torch.long) - loss = F.cross_entropy(out, y) - loss.backward() - optimizer.step() - - if i % 10 == 0: - print(f'Epoch: {epoch:02d}, Iteration: {i}, Loss: {loss:.4f}, ' - f's/iter: {time.perf_counter() - start:.6f}') - - -@torch.no_grad() -def test(loader: NeighborLoader, val_steps: Optional[int] = None): - model.eval() - - total_correct = total_examples = 0 - for i, batch in enumerate(loader): - if val_steps is not None and i >= val_steps: - break - - batch = batch.to(device) - out = model(batch.x, batch.edge_index)[:batch.batch_size] - pred = out.argmax(dim=-1) - y = batch.y[:batch.batch_size].view(-1).to(torch.long) - - total_correct += int((pred == y).sum()) - total_examples += y.size(0) - - return total_correct / total_examples - - -for epoch in range(1, 4): - train() - val_acc = test(val_loader, val_steps=100) - print(f'Val Acc: ~{val_acc:.4f}') - -test_acc = test(test_loader) -print(f'Test Acc: {test_acc:.4f}') diff --git a/pytorch_geometric-2.5.3/test/nn/models/test_jumping_knowledge.py b/pytorch_geometric-2.5.3/test/nn/models/test_jumping_knowledge.py deleted file mode 100644 index 0a03d8e..0000000 --- a/pytorch_geometric-2.5.3/test/nn/models/test_jumping_knowledge.py +++ /dev/null @@ -1,40 +0,0 @@ -import torch - -from torch_geometric.nn import JumpingKnowledge -from torch_geometric.testing import is_full_test - - -def test_jumping_knowledge(): - num_nodes, channels, num_layers = 100, 17, 5 - xs = list([torch.randn(num_nodes, channels) for _ in range(num_layers)]) - - model = JumpingKnowledge('cat') - assert str(model) == 'JumpingKnowledge(cat)' - - out = model(xs) - assert out.size() == (num_nodes, channels * num_layers) - - if is_full_test(): - jit = torch.jit.script(model) - assert torch.allclose(jit(xs), out) - - model = JumpingKnowledge('max') - assert str(model) == 'JumpingKnowledge(max)' - - out = model(xs) - assert out.size() == (num_nodes, channels) - - if is_full_test(): - jit = torch.jit.script(model) - assert torch.allclose(jit(xs), out) - - model = JumpingKnowledge('lstm', channels, num_layers) - assert str(model) == (f'JumpingKnowledge(lstm, channels=' - f'{channels}, layers={num_layers})') - - out = model(xs) - assert out.size() == (num_nodes, channels) - - if is_full_test(): - jit = torch.jit.script(model) - assert torch.allclose(jit(xs), out) diff --git a/pytorch_geometric-2.5.3/torch_geometric/nn/sequential.jinja b/pytorch_geometric-2.5.3/torch_geometric/nn/sequential.jinja deleted file mode 100644 index a64713e..0000000 --- a/pytorch_geometric-2.5.3/torch_geometric/nn/sequential.jinja +++ /dev/null @@ -1,35 +0,0 @@ -import typing -from typing import * - -import torch -from torch import Tensor - -import torch_geometric.typing -from torch_geometric.typing import * - - -class Sequential(torch.nn.Module): - def reset_parameters(self) -> None: -{%- for child in children %} - if hasattr(self.{{child.name}}, 'reset_parameters'): - self.{{child.name}}.reset_parameters() -{%- endfor %} - - def forward(self, {{ input_types|join(', ') }}) -> {{return_type}}: -{%- for child in children %} - {{child.return_names|join(', ')}} = self.{{child.name}}({{child.param_names|join(', ')}}) -{%- endfor %} - return {{children[-1].return_names|join(', ')}} - - def __getitem__(self, idx: int) -> torch.nn.Module: - return getattr(self, self._module_names[idx]) - - def __len__(self) -> int: - return {{children|length}} - - def __repr__(self) -> str: - module_reprs = [ - f' ({i}) - {self[i]}: {self._module_descs[i]}' - for i in range(len(self)) - ] - return 'Sequential(\n{}\n)'.format('\n'.join(module_reprs)) diff --git a/pytorch_geometric-2.5.3/torch_geometric/nn/sequential.py b/pytorch_geometric-2.5.3/torch_geometric/nn/sequential.py deleted file mode 100644 index 498eaa7..0000000 --- a/pytorch_geometric-2.5.3/torch_geometric/nn/sequential.py +++ /dev/null @@ -1,147 +0,0 @@ -import os.path as osp -import random -from typing import Callable, List, NamedTuple, Optional, Tuple, Union - -import torch -from torch import Tensor - -from torch_geometric.inspector import split, type_repr -from torch_geometric.template import module_from_template - - -class Child(NamedTuple): - name: str - module: Callable - param_names: List[str] - return_names: List[str] - - -def Sequential( - input_args: str, - modules: List[Union[Tuple[Callable, str], Callable]], -) -> torch.nn.Module: - r"""An extension of the :class:`torch.nn.Sequential` container in order to - define a sequential GNN model. - - Since GNN operators take in multiple input arguments, - :class:`torch_geometric.nn.Sequential` additionally expects both global - input arguments, and function header definitions of individual operators. - If omitted, an intermediate module will operate on the *output* of its - preceding module: - - .. code-block:: python - - from torch.nn import Linear, ReLU - from torch_geometric.nn import Sequential, GCNConv - - model = Sequential('x, edge_index', [ - (GCNConv(in_channels, 64), 'x, edge_index -> x'), - ReLU(inplace=True), - (GCNConv(64, 64), 'x, edge_index -> x'), - ReLU(inplace=True), - Linear(64, out_channels), - ]) - - Here, :obj:`'x, edge_index'` defines the input arguments of :obj:`model`, - and :obj:`'x, edge_index -> x'` defines the function header, *i.e.* input - arguments *and* return types of :class:`~torch_geometric.nn.conv.GCNConv`. - - In particular, this also allows to create more sophisticated models, - such as utilizing :class:`~torch_geometric.nn.models.JumpingKnowledge`: - - .. code-block:: python - - from torch.nn import Linear, ReLU, Dropout - from torch_geometric.nn import Sequential, GCNConv, JumpingKnowledge - from torch_geometric.nn import global_mean_pool - - model = Sequential('x, edge_index, batch', [ - (Dropout(p=0.5), 'x -> x'), - (GCNConv(dataset.num_features, 64), 'x, edge_index -> x1'), - ReLU(inplace=True), - (GCNConv(64, 64), 'x1, edge_index -> x2'), - ReLU(inplace=True), - (lambda x1, x2: [x1, x2], 'x1, x2 -> xs'), - (JumpingKnowledge("cat", 64, num_layers=2), 'xs -> x'), - (global_mean_pool, 'x, batch -> x'), - Linear(2 * 64, dataset.num_classes), - ]) - - Args: - input_args (str): The input arguments of the model. - modules ([(str, Callable) or Callable]): A list of modules (with - optional function header definitions). Alternatively, an - :obj:`OrderedDict` of modules (and function header definitions) can - be passed. - """ - signature = input_args.split('->') - if len(signature) == 1: - input_args = signature[0] - return_type = type_repr(Tensor, globals()) - elif len(signature) == 2: - input_args, return_type = signature[0], signature[1].strip() - else: - raise ValueError(f"Failed to parse arguments (got '{input_args}')") - - input_types = split(input_args, sep=',') - if len(input_types) == 0: - raise ValueError(f"Failed to parse arguments (got '{input_args}')") - - if not isinstance(modules, dict): - modules = {f'module_{i}': module for i, module in enumerate(modules)} - if len(modules) == 0: - raise ValueError("'Sequential' expected a non-empty list of modules") - - children: List[Child] = [] - for i, (name, module) in enumerate(modules.items()): - desc: Optional[str] = None - if isinstance(module, (tuple, list)): - if len(module) == 1: - module = module[0] - elif len(module) == 2: - module, desc = module - else: - raise ValueError(f"Expected tuple of length 2 (got {module})") - - if i == 0 and desc is None: - raise ValueError("Requires signature for first module") - if not callable(module): - raise ValueError(f"Expected callable module (got {module})") - if desc is not None and not isinstance(desc, str): - raise ValueError(f"Expected type hint representation (got {desc})") - - if desc is not None: - signature = desc.split('->') - if len(signature) != 2: - raise ValueError(f"Failed to parse arguments (got '{desc}')") - param_names = [v.strip() for v in signature[0].split(',')] - return_names = [v.strip() for v in signature[1].split(',')] - child = Child(name, module, param_names, return_names) - else: - param_names = children[-1].return_names - child = Child(name, module, param_names, param_names) - - children.append(child) - - uid = '%06x' % random.randrange(16**6) - root_dir = osp.dirname(osp.realpath(__file__)) - module = module_from_template( - module_name=f'torch_geometric.nn.sequential_{uid}', - template_path=osp.join(root_dir, 'sequential.jinja'), - tmp_dirname='sequential', - # Keyword arguments: - input_types=input_types, - return_type=return_type, - children=children, - ) - - model = module.Sequential() - model._module_names = [child.name for child in children] - model._module_descs = [ - f"{', '.join(child.param_names)} -> {', '.join(child.return_names)}" - for child in children - ] - for child in children: - setattr(model, child.name, child.module) - - return model diff --git a/pytorch_geometric-2.5.3/.github/CODEOWNERS b/pytorch_geometric-2.6.1/.github/CODEOWNERS similarity index 100% rename from pytorch_geometric-2.5.3/.github/CODEOWNERS rename to pytorch_geometric-2.6.1/.github/CODEOWNERS diff --git a/pytorch_geometric-2.5.3/.github/CONTRIBUTING.md b/pytorch_geometric-2.6.1/.github/CONTRIBUTING.md similarity index 100% rename from pytorch_geometric-2.5.3/.github/CONTRIBUTING.md rename to pytorch_geometric-2.6.1/.github/CONTRIBUTING.md diff --git a/pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/bug-report.yml b/pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/bug-report.yml similarity index 100% rename from pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/bug-report.yml rename to pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/bug-report.yml diff --git a/pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/config.yml b/pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/config.yml similarity index 100% rename from pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/config.yml rename to pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/config.yml diff --git a/pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/documentation.yml b/pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/documentation.yml similarity index 100% rename from pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/documentation.yml rename to pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/documentation.yml diff --git a/pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/feature-request.yml b/pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/feature-request.yml similarity index 100% rename from pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/feature-request.yml rename to pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/feature-request.yml diff --git a/pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/installation.yml b/pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/installation.yml similarity index 100% rename from pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/installation.yml rename to pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/installation.yml diff --git a/pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/refactor.yml b/pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/refactor.yml similarity index 100% rename from pytorch_geometric-2.5.3/.github/ISSUE_TEMPLATE/refactor.yml rename to pytorch_geometric-2.6.1/.github/ISSUE_TEMPLATE/refactor.yml diff --git a/pytorch_geometric-2.5.3/.github/actions/setup/action.yml b/pytorch_geometric-2.6.1/.github/actions/setup/action.yml similarity index 87% rename from pytorch_geometric-2.5.3/.github/actions/setup/action.yml rename to pytorch_geometric-2.6.1/.github/actions/setup/action.yml index b73c757..011d5cc 100644 --- a/pytorch_geometric-2.5.3/.github/actions/setup/action.yml +++ b/pytorch_geometric-2.6.1/.github/actions/setup/action.yml @@ -6,13 +6,13 @@ inputs: default: '3.8' torch-version: required: false - default: '2.2.0' + default: '2.4.0' cuda-version: required: false default: cpu torchvision-version: required: false - default: '0.17.0' + default: '0.19.0' full_install: required: false default: true @@ -48,29 +48,34 @@ runs: python -c "import torch; print('CUDA:', torch.version.cuda)" shell: bash - - name: Install pyg-lib # pyg-lib is currently only available on Linux. - if: ${{ inputs.torch-version != 'nightly' && runner.os == 'Linux' }} + - name: Install pyg-lib + if: ${{ inputs.torch-version != 'nightly' }} run: | pip uninstall -y pyg-lib pip install --no-index pyg-lib -f https://data.pyg.org/whl/nightly/torch-${{ inputs.torch-version }}+${{ inputs.cuda-version }}.html shell: bash - name: Install faiss-cpu - if: ${{ inputs.full_install == 'true' && inputs.cuda-version == 'cpu' }} + if: ${{ inputs.full_install == 'true' && inputs.cuda-version == 'cpu' && runner.os != 'macOS' }} run: | - pip install faiss-cpu + pip install faiss-cpu==1.7.2 shell: bash - name: Install faiss-gpu if: ${{ inputs.full_install == 'true' && inputs.cuda-version != 'cpu' }} run: | - pip install faiss-gpu + pip install faiss-gpu==1.7.2 shell: bash - - name: Install extension packages + - name: Install torchvision if: ${{ inputs.full_install == 'true' && inputs.torch-version != 'nightly' }} run: | pip install torchvision==${{ inputs.torchvision-version }} --extra-index-url https://download.pytorch.org/whl/${{ inputs.cuda-version }} + shell: bash + + - name: Install extension packages + if: ${{ inputs.full_install == 'true' && inputs.torch-version != 'nightly' }} + run: | pip install scipy pip install --no-index --upgrade 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 diff --git a/pytorch_geometric-2.5.3/.github/labeler.yml b/pytorch_geometric-2.6.1/.github/labeler.yml similarity index 95% rename from pytorch_geometric-2.5.3/.github/labeler.yml rename to pytorch_geometric-2.6.1/.github/labeler.yml index 8e91499..ae2f57c 100644 --- a/pytorch_geometric-2.5.3/.github/labeler.yml +++ b/pytorch_geometric-2.6.1/.github/labeler.yml @@ -54,5 +54,5 @@ benchmark: - changed-files: - any-glob-to-any-file: ["benchmark/**/*", "torch_geometric/profile/**/*"] -skip-changelog: - - head-branch: ['^skip'] +auto-skip-changelog: + - head-branch: ['^skip', '^pre-commit-ci'] diff --git a/pytorch_geometric-2.5.3/.github/workflows/building_pyg_conda.yml b/pytorch_geometric-2.6.1/.github/workflows/building_pyg_conda.yml similarity index 91% rename from pytorch_geometric-2.5.3/.github/workflows/building_pyg_conda.yml rename to pytorch_geometric-2.6.1/.github/workflows/building_pyg_conda.yml index 97a7495..f2bec4d 100644 --- a/pytorch_geometric-2.5.3/.github/workflows/building_pyg_conda.yml +++ b/pytorch_geometric-2.6.1/.github/workflows/building_pyg_conda.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-14, windows-latest] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] torch-version: [1.12.0, 1.13.0, 2.0.0, 2.1.0, 2.2.0] cuda-version: ['cpu', 'cu113', 'cu116', 'cu117', 'cu118', 'cu121'] @@ -57,16 +57,20 @@ jobs: cuda-version: 'cu116' - torch-version: 2.2.0 cuda-version: 'cu117' - - os: macos-latest + - os: macos-14 cuda-version: 'cu113' - - os: macos-latest + - os: macos-14 cuda-version: 'cu116' - - os: macos-latest + - os: macos-14 cuda-version: 'cu117' - - os: macos-latest + - os: macos-14 cuda-version: 'cu118' - - os: macos-latest + - os: macos-14 cuda-version: 'cu121' + - os: macos-14 + python-version: '3.8' + - os: macos-14 + python-version: '3.9' steps: - name: Checkout repository diff --git a/pytorch_geometric-2.5.3/.github/workflows/building_rusty1s_conda.yml b/pytorch_geometric-2.6.1/.github/workflows/building_rusty1s_conda.yml similarity index 91% rename from pytorch_geometric-2.5.3/.github/workflows/building_rusty1s_conda.yml rename to pytorch_geometric-2.6.1/.github/workflows/building_rusty1s_conda.yml index 12d89a6..128fb1a 100644 --- a/pytorch_geometric-2.5.3/.github/workflows/building_rusty1s_conda.yml +++ b/pytorch_geometric-2.6.1/.github/workflows/building_rusty1s_conda.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-14, windows-latest] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] torch-version: [1.12.0, 1.13.0, 2.0.0, 2.1.0, 2.2.0] cuda-version: ['cpu', 'cu113', 'cu116', 'cu117', 'cu118', 'cu121'] @@ -57,16 +57,20 @@ jobs: cuda-version: 'cu116' - torch-version: 2.2.0 cuda-version: 'cu117' - - os: macos-latest + - os: macos-14 cuda-version: 'cu113' - - os: macos-latest + - os: macos-14 cuda-version: 'cu116' - - os: macos-latest + - os: macos-14 cuda-version: 'cu117' - - os: macos-latest + - os: macos-14 cuda-version: 'cu118' - - os: macos-latest + - os: macos-14 cuda-version: 'cu121' + - os: macos-14 + python-version: '3.8' + - os: macos-14 + python-version: '3.9' steps: - name: Checkout repository diff --git a/pytorch_geometric-2.5.3/.github/workflows/changelog.yml b/pytorch_geometric-2.6.1/.github/workflows/changelog.yml similarity index 84% rename from pytorch_geometric-2.5.3/.github/workflows/changelog.yml rename to pytorch_geometric-2.6.1/.github/workflows/changelog.yml index 203ad3e..5e6892b 100644 --- a/pytorch_geometric-2.5.3/.github/workflows/changelog.yml +++ b/pytorch_geometric-2.6.1/.github/workflows/changelog.yml @@ -13,4 +13,4 @@ jobs: - name: Enforce changelog entry uses: dangoslen/changelog-enforcer@v3 with: - skipLabels: 'skip-changelog' + skipLabels: skip-changelog, auto-skip-changelog diff --git a/pytorch_geometric-2.5.3/.github/workflows/dist_testing.yml b/pytorch_geometric-2.6.1/.github/workflows/dist_testing.yml similarity index 100% rename from pytorch_geometric-2.5.3/.github/workflows/dist_testing.yml rename to pytorch_geometric-2.6.1/.github/workflows/dist_testing.yml diff --git a/pytorch_geometric-2.5.3/.github/workflows/documentation.yml b/pytorch_geometric-2.6.1/.github/workflows/documentation.yml similarity index 100% rename from pytorch_geometric-2.5.3/.github/workflows/documentation.yml rename to pytorch_geometric-2.6.1/.github/workflows/documentation.yml diff --git a/pytorch_geometric-2.5.3/.github/workflows/examples.yml b/pytorch_geometric-2.6.1/.github/workflows/examples.yml similarity index 100% rename from pytorch_geometric-2.5.3/.github/workflows/examples.yml rename to pytorch_geometric-2.6.1/.github/workflows/examples.yml diff --git a/pytorch_geometric-2.5.3/.github/workflows/full_gpu_testing.yml b/pytorch_geometric-2.6.1/.github/workflows/full_gpu_testing.yml similarity index 100% rename from pytorch_geometric-2.5.3/.github/workflows/full_gpu_testing.yml rename to pytorch_geometric-2.6.1/.github/workflows/full_gpu_testing.yml diff --git a/pytorch_geometric-2.5.3/.github/workflows/full_testing.yml b/pytorch_geometric-2.6.1/.github/workflows/full_testing.yml similarity index 63% rename from pytorch_geometric-2.5.3/.github/workflows/full_testing.yml rename to pytorch_geometric-2.6.1/.github/workflows/full_testing.yml index 0c3a894..437d3c2 100644 --- a/pytorch_geometric-2.5.3/.github/workflows/full_testing.yml +++ b/pytorch_geometric-2.6.1/.github/workflows/full_testing.yml @@ -14,9 +14,9 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest, windows-latest, macos-14] python-version: ['3.8', '3.10'] - torch-version: [1.13.0, 2.0.0, 2.1.0, 2.2.0, nightly] + torch-version: [1.13.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, nightly] include: - torch-version: 1.13.0 torchvision-version: 0.14.0 @@ -26,8 +26,27 @@ jobs: torchvision-version: 0.16.0 - torch-version: 2.2.0 torchvision-version: 0.17.0 + - torch-version: 2.3.0 + torchvision-version: 0.18.0 + - torch-version: 2.4.0 + torchvision-version: 0.19.0 - torch-version: nightly torchvision-version: nightly + exclude: + - os: macos-14 + python-version: '3.8' + - os: macos-14 + torch-version: 1.13.0 + - os: macos-14 + torch-version: 2.0.0 + - os: macos-14 + torch-version: 2.1.0 + - os: macos-14 + torch-version: 2.2.0 + # TODO Some dependency version conflict lets pytest crash on Windows/3.10/2.4.0 + - os: windows-latest + python-version: '3.10' + torch-version: 2.4.0 steps: - name: Checkout repository @@ -45,6 +64,11 @@ jobs: run: | sudo apt-get install graphviz + - name: Install mpmath + if: ${{ matrix.torch-version == 'nightly' }} + run: | + pip install mpmath==1.3.0 + - name: Install main package run: | pip install -e .[full,test] diff --git a/pytorch_geometric-2.5.3/.github/workflows/labeler.yml b/pytorch_geometric-2.6.1/.github/workflows/labeler.yml similarity index 81% rename from pytorch_geometric-2.5.3/.github/workflows/labeler.yml rename to pytorch_geometric-2.6.1/.github/workflows/labeler.yml index bb736dc..162f9b0 100644 --- a/pytorch_geometric-2.5.3/.github/workflows/labeler.yml +++ b/pytorch_geometric-2.6.1/.github/workflows/labeler.yml @@ -1,11 +1,11 @@ name: PR Labeler on: # yamllint disable-line rule:truthy - pull_request_target: + pull_request: jobs: - triage: + assign-labels: if: github.repository == 'pyg-team/pytorch_geometric' runs-on: ubuntu-latest @@ -21,9 +21,14 @@ jobs: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true + assign-author: + if: github.repository == 'pyg-team/pytorch_geometric' + runs-on: ubuntu-latest + + steps: - name: Add PR author uses: samspills/assign-pr-to-author@v1.0 - if: github.event_name == 'pull_request' continue-on-error: true + if: github.event_name == 'pull_request' with: repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/pytorch_geometric-2.5.3/.github/workflows/latest_testing.yml b/pytorch_geometric-2.6.1/.github/workflows/latest_testing.yml similarity index 93% rename from pytorch_geometric-2.5.3/.github/workflows/latest_testing.yml rename to pytorch_geometric-2.6.1/.github/workflows/latest_testing.yml index 47f7331..339872a 100644 --- a/pytorch_geometric-2.5.3/.github/workflows/latest_testing.yml +++ b/pytorch_geometric-2.6.1/.github/workflows/latest_testing.yml @@ -38,6 +38,10 @@ jobs: with: torch-version: nightly + - name: Install mpmath + run: | + pip install mpmath==1.3.0 + - name: Install main package if: steps.changed-files-specific.outputs.only_changed != 'true' run: | diff --git a/pytorch_geometric-2.5.3/.github/workflows/linting.yml b/pytorch_geometric-2.6.1/.github/workflows/linting.yml similarity index 100% rename from pytorch_geometric-2.5.3/.github/workflows/linting.yml rename to pytorch_geometric-2.6.1/.github/workflows/linting.yml diff --git a/pytorch_geometric-2.5.3/.github/workflows/minimal_testing.yml b/pytorch_geometric-2.6.1/.github/workflows/minimal_testing.yml similarity index 97% rename from pytorch_geometric-2.5.3/.github/workflows/minimal_testing.yml rename to pytorch_geometric-2.6.1/.github/workflows/minimal_testing.yml index 3b03910..33df353 100644 --- a/pytorch_geometric-2.5.3/.github/workflows/minimal_testing.yml +++ b/pytorch_geometric-2.6.1/.github/workflows/minimal_testing.yml @@ -1,4 +1,4 @@ -name: Testing minimal PyTorch 2.2 +name: Testing minimal PyTorch 2.4 on: # yamllint disable-line rule:truthy push: diff --git a/pytorch_geometric-2.5.3/.github/workflows/nightly.yml b/pytorch_geometric-2.6.1/.github/workflows/nightly.yml similarity index 95% rename from pytorch_geometric-2.5.3/.github/workflows/nightly.yml rename to pytorch_geometric-2.6.1/.github/workflows/nightly.yml index d214544..2fe9fde 100644 --- a/pytorch_geometric-2.5.3/.github/workflows/nightly.yml +++ b/pytorch_geometric-2.6.1/.github/workflows/nightly.yml @@ -29,7 +29,7 @@ jobs: - name: Customize build version run: | sed -i "s/$VERSION/$VERSION.dev$TODAY/" torch_geometric/__init__.py - sed -i '0,/name="torch_geometric"/s//name="pyg-nightly"/' pyproject.toml # Only change first occurence + sed -i '0,/name="torch-geometric"/s//name="pyg-nightly"/' pyproject.toml # Only change first occurence sed -i "s/version=\"$VERSION\"/version=\"$VERSION.dev$TODAY\"/" pyproject.toml - name: Build package diff --git a/pytorch_geometric-2.5.3/.github/workflows/prev_testing.yml b/pytorch_geometric-2.6.1/.github/workflows/prev_testing.yml similarity index 92% rename from pytorch_geometric-2.5.3/.github/workflows/prev_testing.yml rename to pytorch_geometric-2.6.1/.github/workflows/prev_testing.yml index 9d64df0..ab1d220 100644 --- a/pytorch_geometric-2.5.3/.github/workflows/prev_testing.yml +++ b/pytorch_geometric-2.6.1/.github/workflows/prev_testing.yml @@ -14,14 +14,14 @@ jobs: strategy: fail-fast: false matrix: - torch-version: [1.13.0, 2.0.0, 2.1.0] + torch-version: [1.13.0, 2.1.0, 2.3.0] include: - torch-version: 1.13.0 torchvision-version: 0.14.0 - - torch-version: 2.0.0 - torchvision-version: 0.15.0 - torch-version: 2.1.0 torchvision-version: 0.16.0 + - torch-version: 2.3.0 + torchvision-version: 0.18.0 steps: - name: Checkout repository diff --git a/pytorch_geometric-2.5.3/.github/workflows/testing.yml b/pytorch_geometric-2.6.1/.github/workflows/testing.yml similarity index 58% rename from pytorch_geometric-2.5.3/.github/workflows/testing.yml rename to pytorch_geometric-2.6.1/.github/workflows/testing.yml index b782b42..9c915bf 100644 --- a/pytorch_geometric-2.5.3/.github/workflows/testing.yml +++ b/pytorch_geometric-2.6.1/.github/workflows/testing.yml @@ -1,4 +1,4 @@ -name: Testing PyTorch 2.2 +name: Testing PyTorch 2.4 on: # yamllint disable-line rule:truthy push: @@ -9,7 +9,19 @@ on: # yamllint disable-line rule:truthy jobs: pytest: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-14] + include: + - os: ubuntu-latest + python-version: '3.8' + - os: windows-latest + python-version: '3.8' + - os: macos-14 + python-version: '3.10' steps: - name: Checkout repository @@ -35,9 +47,16 @@ jobs: - name: Setup packages if: steps.changed-files-specific.outputs.only_changed != 'true' uses: ./.github/actions/setup + with: + python-version: ${{ matrix.python-version }} - name: Install main package - if: steps.changed-files-specific.outputs.only_changed != 'true' + if: ${{ steps.changed-files-specific.outputs.only_changed != 'true' && runner.os == 'Windows' }} + run: | + pip install -e .[test] + + - name: Install full main package + if: ${{ steps.changed-files-specific.outputs.only_changed != 'true' && runner.os != 'Windows' }} run: | pip install -e .[full,test] @@ -48,7 +67,7 @@ jobs: pytest --cov --cov-report=xml --durations 10 - name: Upload coverage - if: steps.changed-files-specific.outputs.only_changed != 'true' + if: ${{ steps.changed-files-specific.outputs.only_changed != 'true' && runner.os == 'Linux' }} uses: codecov/codecov-action@v2 with: fail_ci_if_error: false diff --git a/pytorch_geometric-2.6.1/.gitignore b/pytorch_geometric-2.6.1/.gitignore new file mode 100644 index 0000000..c38a9ed --- /dev/null +++ b/pytorch_geometric-2.6.1/.gitignore @@ -0,0 +1,33 @@ +__pycache__/ +.pytest_cache/ +.DS_Store +data/ +build/ +dist/ +alpha/ +runs/ +wandb/ +.cache/ +.eggs/ +lightning_logs/ +outputs/ +graphgym/datasets/ +graphgym/results/ +*.egg-info/ +.ipynb_checkpoints +.coverage +.coverage.* +coverage.xml +.vscode +.idea +.venv +*.out +*.pt +*.onnx +examples/**/*.png +examples/**/*.pdf +benchmark/results/ +.mypy_cache/ + +!torch_geometric/data/ +!test/data/ diff --git a/pytorch_geometric-2.5.3/.pre-commit-config.yaml b/pytorch_geometric-2.6.1/.pre-commit-config.yaml similarity index 71% rename from pytorch_geometric-2.5.3/.pre-commit-config.yaml rename to pytorch_geometric-2.6.1/.pre-commit-config.yaml index 569ba7b..18102d1 100644 --- a/pytorch_geometric-2.5.3/.pre-commit-config.yaml +++ b/pytorch_geometric-2.6.1/.pre-commit-config.yaml @@ -5,7 +5,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: no-commit-to-branch name: No commits to master @@ -27,12 +27,32 @@ repos: )$ - repo: https://github.com/adrienverge/yamllint.git - rev: v1.33.0 + rev: v1.35.1 hooks: - id: yamllint name: Lint yaml args: [-d, '{extends: default, rules: {line-length: disable, document-start: disable, truthy: {level: error}, braces: {max-spaces-inside: 1}}}'] + - repo: https://github.com/asottile/pyupgrade + rev: v3.16.0 + hooks: + - id: pyupgrade + name: Upgrade Python syntax + args: [--py38-plus] + + - repo: https://github.com/PyCQA/autoflake + rev: v2.3.1 + hooks: + - id: autoflake + name: Remove unused imports and variables + args: [ + --remove-all-unused-imports, + --remove-unused-variables, + --remove-duplicate-keys, + --ignore-init-module-imports, + --in-place, + ] + - repo: https://github.com/google/yapf rev: v0.40.2 hooks: @@ -47,14 +67,14 @@ repos: name: Sort imports - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.1.0 hooks: - id: flake8 name: Check PEP8 additional_dependencies: [Flake8-pyproject] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.9 + rev: v0.5.0 hooks: - id: ruff name: Ruff formatting @@ -69,3 +89,9 @@ repos: - mdformat-gfm - mdformat_frontmatter - mdformat_footnote + + - repo: https://github.com/sphinx-contrib/sphinx-lint + rev: v0.9.1 + hooks: + - id: sphinx-lint + name: Check Sphinx diff --git a/pytorch_geometric-2.5.3/CHANGELOG.md b/pytorch_geometric-2.6.1/CHANGELOG.md similarity index 91% rename from pytorch_geometric-2.5.3/CHANGELOG.md rename to pytorch_geometric-2.6.1/CHANGELOG.md index 48b58f3..f50b2b9 100644 --- a/pytorch_geometric-2.5.3/CHANGELOG.md +++ b/pytorch_geometric-2.6.1/CHANGELOG.md @@ -7,12 +7,92 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Added +- Added the `WebQSPDataset` dataset ([#9481](https://github.com/pyg-team/pytorch_geometric/pull/9481)) +- Added the `GRetriever` model and an example ([#9480](https://github.com/pyg-team/pytorch_geometric/pull/9480), [#9167](https://github.com/pyg-team/pytorch_geometric/pull/9167)) +- Added the `ClusterPooling` layer ([#9627](https://github.com/pyg-team/pytorch_geometric/pull/9627)) +- Added the `LinkPredMRR` metric ([#9632](https://github.com/pyg-team/pytorch_geometric/pull/9632)) +- Added PyTorch 2.4 support ([#9594](https://github.com/pyg-team/pytorch_geometric/pull/9594)) +- Added `utils.normalize_edge_index` for symmetric/asymmetric normalization of graph edges ([#9554](https://github.com/pyg-team/pytorch_geometric/pull/9554)) +- Added the `RemoveSelfLoops` transformation ([#9562](https://github.com/pyg-team/pytorch_geometric/pull/9562)) +- Added ONNX export for `scatter` with min/max reductions ([#9587](https://github.com/pyg-team/pytorch_geometric/pull/9587)) +- Added a `residual` option in `GATConv` and `GATv2Conv` ([#9515](https://github.com/pyg-team/pytorch_geometric/pull/9515)) +- Added the `PatchTransformerAggregation` layer ([#9487](https://github.com/pyg-team/pytorch_geometric/pull/9487)) +- Added the `nn.nlp.LLM` model ([#9462](https://github.com/pyg-team/pytorch_geometric/pull/9462)) +- Added an example of training GNNs for a graph-level regression task ([#9070](https://github.com/pyg-team/pytorch_geometric/pull/9070)) +- Added `utils.from_rdmol`/`utils.to_rdmol` functionality ([#9452](https://github.com/pyg-team/pytorch_geometric/pull/9452)) +- Added the `OPFDataset` ([#9379](https://github.com/pyg-team/pytorch_geometric/pull/9379)) +- Added the heterogeneous `HeteroJumpingKnowledge` module ([#9380](https://github.com/pyg-team/pytorch_geometric/pull/9380)) +- Started work on GNN+LLM package ([#9350](https://github.com/pyg-team/pytorch_geometric/pull/9350)) +- Added support for negative sampling in `LinkLoader` acccording to source and destination node weights ([#9316](https://github.com/pyg-team/pytorch_geometric/pull/9316)) +- Added support for `EdgeIndex.unbind` ([#9298](https://github.com/pyg-team/pytorch_geometric/pull/9298)) +- Integrate `torch_geometric.Index` into `torch_geometric.EdgeIndex` ([#9296](https://github.com/pyg-team/pytorch_geometric/pull/9296)) +- Support `EdgeIndex.sparse_narrow` for non-sorted edge indices ([#9291](https://github.com/pyg-team/pytorch_geometric/pull/9291)) +- Added `torch_geometric.Index` ([#9276](https://github.com/pyg-team/pytorch_geometric/pull/9276), [#9277](https://github.com/pyg-team/pytorch_geometric/pull/9277), [#9278](https://github.com/pyg-team/pytorch_geometric/pull/9278), [#9279](https://github.com/pyg-team/pytorch_geometric/pull/9279), [#9280](https://github.com/pyg-team/pytorch_geometric/pull/9280), [#9281](https://github.com/pyg-team/pytorch_geometric/pull/9281), [#9284](https://github.com/pyg-team/pytorch_geometric/pull/9284), [#9285](https://github.com/pyg-team/pytorch_geometric/pull/9285), [#9286](https://github.com/pyg-team/pytorch_geometric/pull/9286), [#9287](https://github.com/pyg-team/pytorch_geometric/pull/9287), [#9288](https://github.com/pyg-team/pytorch_geometric/pull/9288), [#9289](https://github.com/pyg-team/pytorch_geometric/pull/9289), [#9297](https://github.com/pyg-team/pytorch_geometric/pull/9297)) +- Added support for PyTorch 2.3 ([#9240](https://github.com/pyg-team/pytorch_geometric/pull/9240)) +- Added support for `EdgeIndex` in `message_and_aggregate` ([#9131](https://github.com/pyg-team/pytorch_geometric/pull/9131)) +- Added `CornellTemporalHyperGraphDataset` ([#9090](https://github.com/pyg-team/pytorch_geometric/pull/9090)) +- Added support for cuGraph data loading and `GAT` in single node Papers100m examples ([#8173](https://github.com/pyg-team/pytorch_geometric/pull/8173)) +- Added the `VariancePreservingAggregation` (VPA) ([#9075](https://github.com/pyg-team/pytorch_geometric/pull/9075)) +- Added option to pass custom` from_smiles` functionality to `PCQM4Mv2` and `MoleculeNet` ([#9073](https://github.com/pyg-team/pytorch_geometric/pull/9073)) +- Added `group_cat` functionality ([#9029](https://github.com/pyg-team/pytorch_geometric/pull/9029)) +- Added support for `EdgeIndex` in `spmm` ([#9026](https://github.com/pyg-team/pytorch_geometric/pull/9026)) +- Added option to pre-allocate memory in GPU-based `ApproxKNN` ([#9046](https://github.com/pyg-team/pytorch_geometric/pull/9046)) +- Added support for `EdgeIndex` in `MessagePassing` ([#9007](https://github.com/pyg-team/pytorch_geometric/pull/9007)) +- Added support for `torch.compile` in combination with `EdgeIndex` ([#9007](https://github.com/pyg-team/pytorch_geometric/pull/9007)) +- Added a `ogbn-mag240m` example ([#8249](https://github.com/pyg-team/pytorch_geometric/pull/8249)) +- Added `EdgeIndex.sparse_resize_` functionality ([#8983](https://github.com/pyg-team/pytorch_geometric/pull/8983)) +- Added approximate `faiss`-based KNN-search ([#8952](https://github.com/pyg-team/pytorch_geometric/pull/8952)) +- Added documentation on environment setup on XPU device ([#9407](https://github.com/pyg-team/pytorch_geometric/pull/9407)) + ### Changed +- Use `torch.load(weights_only=True)` by default ([#9618](https://github.com/pyg-team/pytorch_geometric/pull/9618)) +- Adapt `cugraph` examples to its new API ([#9541](https://github.com/pyg-team/pytorch_geometric/pull/9541)) +- Allow optional but untyped tensors in `MessagePassing` ([#9494](https://github.com/pyg-team/pytorch_geometric/pull/9494)) +- Added support for modifying `filename` of the stored partitioned file in `ClusterLoader` ([#9448](https://github.com/pyg-team/pytorch_geometric/pull/9448)) +- Support other than two-dimensional inputs in `AttentionalAggregation` ([#9433](https://github.com/pyg-team/pytorch_geometric/pull/9433)) +- Improved model performance of the `examples/ogbn_papers_100m.py` script ([#9386](https://github.com/pyg-team/pytorch_geometric/pull/9386), [#9445](https://github.com/pyg-team/pytorch_geometric/pull/9445)) +- Added the `fmt` arg to `Dataset.get_summary` ([#9408](https://github.com/pyg-team/pytorch_geometric/pull/9408)) +- Skipped zero atom molecules in `MoleculeNet` ([#9318](https://github.com/pyg-team/pytorch_geometric/pull/9318)) +- Ensure proper parallelism in `OnDiskDataset` for multi-threaded `get` calls ([#9140](https://github.com/pyg-team/pytorch_geometric/pull/9140)) +- Allow `None` outputs in `FeatureStore.get_tensor()` - `KeyError` should now be raised based on the implementation in `FeatureStore._get_tensor()` ([#9102](https://github.com/pyg-team/pytorch_geometric/pull/9102)) +- Allow mini-batching of uncoalesced sparse matrices ([#9099](https://github.com/pyg-team/pytorch_geometric/pull/9099)) +- Improvements to multi-node `ogbn-papers100m` default hyperparameters and adding evaluation on all ranks ([#8823](https://github.com/pyg-team/pytorch_geometric/pull/8823)) +- Changed distributed sampler and loader tests to correctly report failures in subprocesses to `pytest` ([#8978](https://github.com/pyg-team/pytorch_geometric/pull/8978)) +- Remove filtering of node/edge types in `trim_to_layer` functionality ([#9021](https://github.com/pyg-team/pytorch_geometric/pull/9021)) +- Default to `scatter` operations in `MessagePassing` in case `torch.use_deterministic_algorithms` is not set ([#9009](https://github.com/pyg-team/pytorch_geometric/pull/9009)) +- Made `MessagePassing` interface thread-safe ([#9001](https://github.com/pyg-team/pytorch_geometric/pull/9001)) +- Breaking Change: Added support for `EdgeIndex` in `cugraph` GNN layers ([#8938](https://github.com/pyg-team/pytorch_geometric/pull/8937)) +- Added the `dim` arg to `torch.cross` calls ([#8918](https://github.com/pyg-team/pytorch_geometric/pull/8918)) +- Added XPU support to basic GNN examples ([#9421](https://github.com/pyg-team/pytorch_geometric/pull/9421), [#9439](https://github.com/pyg-team/pytorch_geometric/pull/9439)) + ### Deprecated ### Fixed +- Fixed `VirtualNode` transform for empty edge indices ([#9605](https://github.com/pyg-team/pytorch_geometric/pull/9605)) +- Fixed an issue where import order in the multi-GPU `cugraph` example could cause an `rmm` error ([#9577](https://github.com/pyg-team/pytorch_geometric/pull/9577)) +- Made the output of the single-GPU `cugraph` example more readable ([#9577](https://github.com/pyg-team/pytorch_geometric/pull/9577)) +- Fixed `load_state_dict` behavior with lazy parameters in `HeteroDictLinear` ([#9493](https://github.com/pyg-team/pytorch_geometric/pull/9493)) +- `Sequential` can now be properly pickled ([#9369](https://github.com/pyg-team/pytorch_geometric/pull/9369)) +- Fixed `pickle.load` for jittable `MessagePassing` modules ([#9368](https://github.com/pyg-team/pytorch_geometric/pull/9368)) +- Fixed batching of sparse tensors saved via `data.edge_index` ([#9317](https://github.com/pyg-team/pytorch_geometric/pull/9317)) +- Fixed arbitrary keyword ordering in `MessagePassing.propgate` ([#9245](https://github.com/pyg-team/pytorch_geometric/pull/9245)) +- Fixed node mapping bug in `RCDD` dataset ([#9234](https://github.com/pyg-team/pytorch_geometric/pull/9234)) +- Fixed incorrect treatment of `edge_label` and `edge_label_index` in `ToSparseTensor` transform ([#9199](https://github.com/pyg-team/pytorch_geometric/pull/9199)) +- Fixed `EgoData` processing in `SnapDataset` in case filenames are unsorted ([#9195](https://github.com/pyg-team/pytorch_geometric/pull/9195)) +- Fixed empty graph and isolated node handling in `to_dgl` ([#9188](https://github.com/pyg-team/pytorch_geometric/pull/9188)) +- Fixed bug in `to_scipy_sparse_matrix` when cuda is set as default torch device ([#9146](https://github.com/pyg-team/pytorch_geometric/pull/9146)) +- Fixed `MetaPath2Vec` in case the last node is isolated ([#9145](https://github.com/pyg-team/pytorch_geometric/pull/9145)) +- Ensure backward compatibility in `MessagePassing` via `torch.load` ([#9105](https://github.com/pyg-team/pytorch_geometric/pull/9105)) +- Prevent model compilation on custom `propagate` functions ([#9079](https://github.com/pyg-team/pytorch_geometric/pull/9079)) +- Ignore `self.propagate` appearances in comments when parsing `MessagePassing` implementation ([#9044](https://github.com/pyg-team/pytorch_geometric/pull/9044)) +- Fixed `OSError` on read-only file systems within `MessagePassing` ([#9032](https://github.com/pyg-team/pytorch_geometric/pull/9032)) +- Fixed metaclass conflict in `Dataset` ([#8999](https://github.com/pyg-team/pytorch_geometric/pull/8999)) +- Fixed import errors on `MessagePassing` modules with nested inheritance ([#8973](https://github.com/pyg-team/pytorch_geometric/pull/8973)) +- Fixed bug in multi XPU training ([#9456](https://github.com/pyg-team/pytorch_geometric/pull/9456)) +- Fixed TorchScript compilation error for `MessagePassing._check_input` on older torch versions ([#9564](https://github.com/pyg-team/pytorch_geometric/pull/9564)) + ### Removed ## \[2.5.0\] - 2024-02-16 diff --git a/pytorch_geometric-2.5.3/CITATION.cff b/pytorch_geometric-2.6.1/CITATION.cff similarity index 100% rename from pytorch_geometric-2.5.3/CITATION.cff rename to pytorch_geometric-2.6.1/CITATION.cff diff --git a/pytorch_geometric-2.5.3/LICENSE b/pytorch_geometric-2.6.1/LICENSE similarity index 100% rename from pytorch_geometric-2.5.3/LICENSE rename to pytorch_geometric-2.6.1/LICENSE diff --git a/pytorch_geometric-2.5.3/README.md b/pytorch_geometric-2.6.1/README.md similarity index 96% rename from pytorch_geometric-2.5.3/README.md rename to pytorch_geometric-2.6.1/README.md index d0210dd..17a51ff 100644 --- a/pytorch_geometric-2.5.3/README.md +++ b/pytorch_geometric-2.6.1/README.md @@ -16,12 +16,12 @@ ______________________________________________________________________ **PyG** *(PyTorch Geometric)* is a library built upon [PyTorch](https://pytorch.org/) to easily write and train Graph Neural Networks (GNNs) for a wide range of applications related to structured data. It consists of various methods for deep learning on graphs and other irregular structures, also known as *[geometric deep learning](http://geometricdeeplearning.com/)*, from a variety of published papers. -In addition, it consists of easy-to-use mini-batch loaders for operating on many small and single giant graphs, [multi GPU-support](https://github.com/pyg-team/pytorch_geometric/tree/master/examples/multi_gpu), [`torch.compile`](https://pytorch-geometric.readthedocs.io/en/latest/advanced/compile.html) support, [`DataPipe`](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/datapipe.py) support, a large number of common benchmark datasets (based on simple interfaces to create your own), the [GraphGym](https://pytorch-geometric.readthedocs.io/en/latest/advanced/graphgym.html) experiment manager, and helpful transforms, both for learning on arbitrary graphs as well as on 3D meshes or point clouds. +In addition, it consists of easy-to-use mini-batch loaders for operating on many small and single giant graphs, [multi GPU-support](https://github.com/pyg-team/pytorch_geometric/tree/master/examples/multi_gpu), [`torch.compile`](https://pytorch-geometric.readthedocs.io/en/latest/advanced/compile.html) support, [`DataPipe`](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/datapipe.py) support, a large number of common benchmark datasets (based on simple interfaces to create your own), and helpful transforms, both for learning on arbitrary graphs as well as on 3D meshes or point clouds. **[Click here to join our Slack community!][slack-url]**

- +

______________________________________________________________________ @@ -47,7 +47,6 @@ Whether you are a machine learning researcher or first-time user of machine lear Making modifications to existing models or creating new architectures is simple, thanks to its easy-to-use message passing API, and a variety of operators and utility functions. - **Large-scale real-world GNN models**: We focus on the need of GNN applications in challenging real-world scenarios, and support learning on diverse types of graphs, including but not limited to: scalable GNNs for graphs with millions of nodes; dynamic GNNs for node predictions over time; heterogeneous GNNs with multiple node types and edge types. -- **GraphGym integration**: GraphGym lets users easily reproduce GNN experiments, is able to launch and analyze thousands of different GNN configurations, and is customizable by registering new modules to a GNN learning pipeline. ## Quick Tour for New Users @@ -139,20 +138,6 @@ class EdgeConv(MessagePassing): return self.mlp(edge_features) # shape [num_edges, out_channels] ``` -### Manage experiments with GraphGym - -GraphGym allows you to manage and launch GNN experiments, using a highly modularized pipeline (see [here](https://pytorch-geometric.readthedocs.io/en/latest/advanced/graphgym.html) for the accompanying tutorial). - -``` -git clone https://github.com/pyg-team/pytorch_geometric.git -cd pytorch_geometric/graphgym -bash run_single.sh # run a single GNN experiment (node/edge/graph-level) -bash run_batch.sh # run a batch of GNN experiments, using differnt GNN designs/datasets/tasks -``` - -Users are highly encouraged to check out the [documentation](https://pytorch-geometric.readthedocs.io/en/latest), which contains additional tutorials on the essential functionalities of PyG, including data handling, creation of datasets and a full list of implemented methods, transforms, and datasets. -For a quick start, check out our [examples](https://github.com/pyg-team/pytorch_geometric/tree/master/examples) in `examples/`. - ## Architecture Overview PyG provides a multi-layer framework that enables users to build Graph Neural Network solutions on both low and high levels. @@ -386,39 +371,39 @@ 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.2 +#### PyTorch 2.4 -To install the binaries for PyTorch 2.2.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.2.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** | ✅ | | | | -#### PyTorch 2.1 +#### PyTorch 2.3 -To install the binaries for PyTorch 2.1.0, simply run +To install the binaries for PyTorch 2.3.0, simply run ``` -pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.1.0+${CUDA}.html +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 ``` where `${CUDA}` should be replaced by either `cpu`, `cu118`, or `cu121` depending on your PyTorch installation. | | `cpu` | `cu118` | `cu121` | | ----------- | ----- | ------- | ------- | -| **Linux** | ✅ | ✅ | ✅ | -| **Windows** | ✅ | ✅ | ✅ | -| **macOS** | ✅ | | | +| **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, and PyTorch 2.0.0 (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, and PyTorch 2.2.0/2.2.1/2.2.2 (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). diff --git a/pytorch_geometric-2.5.3/benchmark/README.md b/pytorch_geometric-2.6.1/benchmark/README.md similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/README.md rename to pytorch_geometric-2.6.1/benchmark/README.md diff --git a/pytorch_geometric-2.5.3/benchmark/citation/README.md b/pytorch_geometric-2.6.1/benchmark/citation/README.md similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/README.md rename to pytorch_geometric-2.6.1/benchmark/citation/README.md diff --git a/pytorch_geometric-2.5.3/benchmark/citation/__init__.py b/pytorch_geometric-2.6.1/benchmark/citation/__init__.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/__init__.py rename to pytorch_geometric-2.6.1/benchmark/citation/__init__.py diff --git a/pytorch_geometric-2.5.3/benchmark/citation/appnp.py b/pytorch_geometric-2.6.1/benchmark/citation/appnp.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/appnp.py rename to pytorch_geometric-2.6.1/benchmark/citation/appnp.py diff --git a/pytorch_geometric-2.5.3/benchmark/citation/arma.py b/pytorch_geometric-2.6.1/benchmark/citation/arma.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/arma.py rename to pytorch_geometric-2.6.1/benchmark/citation/arma.py diff --git a/pytorch_geometric-2.5.3/benchmark/citation/cheb.py b/pytorch_geometric-2.6.1/benchmark/citation/cheb.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/cheb.py rename to pytorch_geometric-2.6.1/benchmark/citation/cheb.py diff --git a/pytorch_geometric-2.5.3/benchmark/citation/datasets.py b/pytorch_geometric-2.6.1/benchmark/citation/datasets.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/datasets.py rename to pytorch_geometric-2.6.1/benchmark/citation/datasets.py diff --git a/pytorch_geometric-2.5.3/benchmark/citation/gat.py b/pytorch_geometric-2.6.1/benchmark/citation/gat.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/gat.py rename to pytorch_geometric-2.6.1/benchmark/citation/gat.py diff --git a/pytorch_geometric-2.5.3/benchmark/citation/gcn.py b/pytorch_geometric-2.6.1/benchmark/citation/gcn.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/gcn.py rename to pytorch_geometric-2.6.1/benchmark/citation/gcn.py diff --git a/pytorch_geometric-2.5.3/benchmark/citation/inference.sh b/pytorch_geometric-2.6.1/benchmark/citation/inference.sh similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/inference.sh rename to pytorch_geometric-2.6.1/benchmark/citation/inference.sh diff --git a/pytorch_geometric-2.5.3/benchmark/citation/run.sh b/pytorch_geometric-2.6.1/benchmark/citation/run.sh similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/run.sh rename to pytorch_geometric-2.6.1/benchmark/citation/run.sh diff --git a/pytorch_geometric-2.5.3/benchmark/citation/sgc.py b/pytorch_geometric-2.6.1/benchmark/citation/sgc.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/sgc.py rename to pytorch_geometric-2.6.1/benchmark/citation/sgc.py diff --git a/pytorch_geometric-2.5.3/benchmark/citation/statistics.py b/pytorch_geometric-2.6.1/benchmark/citation/statistics.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/citation/statistics.py rename to pytorch_geometric-2.6.1/benchmark/citation/statistics.py diff --git a/pytorch_geometric-2.5.3/benchmark/citation/train_eval.py b/pytorch_geometric-2.6.1/benchmark/citation/train_eval.py similarity index 98% rename from pytorch_geometric-2.5.3/benchmark/citation/train_eval.py rename to pytorch_geometric-2.6.1/benchmark/citation/train_eval.py index 5fb3630..b8ef423 100644 --- a/pytorch_geometric-2.5.3/benchmark/citation/train_eval.py +++ b/pytorch_geometric-2.6.1/benchmark/citation/train_eval.py @@ -60,7 +60,6 @@ def run_train(dataset, model, runs, epochs, lr, weight_decay, early_stopping, elif hasattr(torch.backends, 'mps') and torch.backends.mps.is_available(): try: - import torch.mps torch.mps.synchronize() except ImportError: pass @@ -98,7 +97,6 @@ def run_train(dataset, model, runs, epochs, lr, weight_decay, early_stopping, elif hasattr(torch.backends, 'mps') and torch.backends.mps.is_available(): try: - import torch.mps torch.mps.synchronize() except ImportError: pass @@ -132,7 +130,7 @@ def run_inference(dataset, model, epochs, profiling, bf16, use_compile, model = torch.compile(model) if torch.cuda.is_available(): - amp = torch.cuda.amp.autocast(enabled=False) + amp = torch.amp.autocast('cuda', enabled=False) else: amp = torch.cpu.amp.autocast(enabled=bf16) if bf16: diff --git a/pytorch_geometric-2.5.3/benchmark/inference/README.md b/pytorch_geometric-2.6.1/benchmark/inference/README.md similarity index 94% rename from pytorch_geometric-2.5.3/benchmark/inference/README.md rename to pytorch_geometric-2.6.1/benchmark/inference/README.md index ca0baf9..75e654b 100644 --- a/pytorch_geometric-2.5.3/benchmark/inference/README.md +++ b/pytorch_geometric-2.6.1/benchmark/inference/README.md @@ -7,6 +7,10 @@ ```bash pip install ogb ``` +1. Install `autoconf` required for `jemalloc` setup: + ```bash + sudo apt-get install autoconf + ``` 1. Install `jemalloc` for performance benchmark: ```bash cd ${workspace} diff --git a/pytorch_geometric-2.5.3/benchmark/inference/inference_benchmark.py b/pytorch_geometric-2.6.1/benchmark/inference/inference_benchmark.py similarity index 98% rename from pytorch_geometric-2.5.3/benchmark/inference/inference_benchmark.py rename to pytorch_geometric-2.6.1/benchmark/inference/inference_benchmark.py index 35e8393..dbf0fb8 100644 --- a/pytorch_geometric-2.5.3/benchmark/inference/inference_benchmark.py +++ b/pytorch_geometric-2.6.1/benchmark/inference/inference_benchmark.py @@ -14,6 +14,7 @@ test, write_to_csv, ) +from torch_geometric.io import fs from torch_geometric.loader import NeighborLoader from torch_geometric.nn import PNAConv from torch_geometric.profile import ( @@ -87,7 +88,7 @@ def run(args: argparse.ArgumentParser): raise ValueError("Layer-wise inference requires `steps=-1`") if args.device == 'cuda': - amp = torch.cuda.amp.autocast(enabled=False) + amp = torch.amp.autocast('cuda', enabled=False) elif args.device == 'xpu': amp = torch.xpu.amp.autocast(enabled=False) else: @@ -186,7 +187,7 @@ def run(args: argparse.ArgumentParser): model = model.to(device) # TODO: Migrate to ModelHubMixin. if args.ckpt_path: - state_dict = torch.load(args.ckpt_path) + state_dict = fs.torch_load(args.ckpt_path) model.load_state_dict(state_dict) model.eval() if args.device == 'xpu': diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/README.md b/pytorch_geometric-2.6.1/benchmark/kernel/README.md similarity index 91% rename from pytorch_geometric-2.5.3/benchmark/kernel/README.md rename to pytorch_geometric-2.6.1/benchmark/kernel/README.md index a673578..0ffd876 100644 --- a/pytorch_geometric-2.5.3/benchmark/kernel/README.md +++ b/pytorch_geometric-2.6.1/benchmark/kernel/README.md @@ -1,6 +1,6 @@ # Graph Classification -Evaluation script for various methods on [common benchmark datasets](http://graphkernels.cs.tu-dortmund.de) via 10-fold cross validation, where a training fold is randomly sampled to serve as a validation set. +Evaluation script for various methods on [common benchmark datasets](https://chrsmrrs.github.io/datasets/) via 10-fold cross validation, where a training fold is randomly sampled to serve as a validation set. Hyperparameter selection is performed for the number of hidden units and the number of layers with respect to the validation set: - **[GCN](https://github.com/pyg-team/pytorch_geometric/blob/master/benchmark/kernel/gcn.py)** diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/__init__.py b/pytorch_geometric-2.6.1/benchmark/kernel/__init__.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/__init__.py rename to pytorch_geometric-2.6.1/benchmark/kernel/__init__.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/asap.py b/pytorch_geometric-2.6.1/benchmark/kernel/asap.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/asap.py rename to pytorch_geometric-2.6.1/benchmark/kernel/asap.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/datasets.py b/pytorch_geometric-2.6.1/benchmark/kernel/datasets.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/datasets.py rename to pytorch_geometric-2.6.1/benchmark/kernel/datasets.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/diff_pool.py b/pytorch_geometric-2.6.1/benchmark/kernel/diff_pool.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/diff_pool.py rename to pytorch_geometric-2.6.1/benchmark/kernel/diff_pool.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/edge_pool.py b/pytorch_geometric-2.6.1/benchmark/kernel/edge_pool.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/edge_pool.py rename to pytorch_geometric-2.6.1/benchmark/kernel/edge_pool.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/gcn.py b/pytorch_geometric-2.6.1/benchmark/kernel/gcn.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/gcn.py rename to pytorch_geometric-2.6.1/benchmark/kernel/gcn.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/gin.py b/pytorch_geometric-2.6.1/benchmark/kernel/gin.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/gin.py rename to pytorch_geometric-2.6.1/benchmark/kernel/gin.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/global_attention.py b/pytorch_geometric-2.6.1/benchmark/kernel/global_attention.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/global_attention.py rename to pytorch_geometric-2.6.1/benchmark/kernel/global_attention.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/graclus.py b/pytorch_geometric-2.6.1/benchmark/kernel/graclus.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/graclus.py rename to pytorch_geometric-2.6.1/benchmark/kernel/graclus.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/graph_sage.py b/pytorch_geometric-2.6.1/benchmark/kernel/graph_sage.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/graph_sage.py rename to pytorch_geometric-2.6.1/benchmark/kernel/graph_sage.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/main.py b/pytorch_geometric-2.6.1/benchmark/kernel/main.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/main.py rename to pytorch_geometric-2.6.1/benchmark/kernel/main.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/main_performance.py b/pytorch_geometric-2.6.1/benchmark/kernel/main_performance.py similarity index 99% rename from pytorch_geometric-2.5.3/benchmark/kernel/main_performance.py rename to pytorch_geometric-2.6.1/benchmark/kernel/main_performance.py index 6a9c6c7..9e8a8ba 100644 --- a/pytorch_geometric-2.5.3/benchmark/kernel/main_performance.py +++ b/pytorch_geometric-2.6.1/benchmark/kernel/main_performance.py @@ -43,7 +43,7 @@ device = torch.device('cpu') if torch.cuda.is_available(): - amp = torch.cuda.amp.autocast(enabled=False) + amp = torch.amp.autocast('cuda', enabled=False) else: amp = torch.cpu.amp.autocast(enabled=args.bf16) diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/sag_pool.py b/pytorch_geometric-2.6.1/benchmark/kernel/sag_pool.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/sag_pool.py rename to pytorch_geometric-2.6.1/benchmark/kernel/sag_pool.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/set2set.py b/pytorch_geometric-2.6.1/benchmark/kernel/set2set.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/set2set.py rename to pytorch_geometric-2.6.1/benchmark/kernel/set2set.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/sort_pool.py b/pytorch_geometric-2.6.1/benchmark/kernel/sort_pool.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/sort_pool.py rename to pytorch_geometric-2.6.1/benchmark/kernel/sort_pool.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/statistics.py b/pytorch_geometric-2.6.1/benchmark/kernel/statistics.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/statistics.py rename to pytorch_geometric-2.6.1/benchmark/kernel/statistics.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/top_k.py b/pytorch_geometric-2.6.1/benchmark/kernel/top_k.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/kernel/top_k.py rename to pytorch_geometric-2.6.1/benchmark/kernel/top_k.py diff --git a/pytorch_geometric-2.5.3/benchmark/kernel/train_eval.py b/pytorch_geometric-2.6.1/benchmark/kernel/train_eval.py similarity index 99% rename from pytorch_geometric-2.5.3/benchmark/kernel/train_eval.py rename to pytorch_geometric-2.6.1/benchmark/kernel/train_eval.py index 7c268b0..3b8595a 100644 --- a/pytorch_geometric-2.5.3/benchmark/kernel/train_eval.py +++ b/pytorch_geometric-2.6.1/benchmark/kernel/train_eval.py @@ -46,7 +46,6 @@ def cross_validation_with_val_set(dataset, model, folds, epochs, batch_size, elif hasattr(torch.backends, 'mps') and torch.backends.mps.is_available(): try: - import torch.mps torch.mps.synchronize() except ImportError: pass diff --git a/pytorch_geometric-2.5.3/benchmark/loader/neighbor_loader.py b/pytorch_geometric-2.6.1/benchmark/loader/neighbor_loader.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/loader/neighbor_loader.py rename to pytorch_geometric-2.6.1/benchmark/loader/neighbor_loader.py diff --git a/pytorch_geometric-2.6.1/benchmark/multi_gpu/training/README.md b/pytorch_geometric-2.6.1/benchmark/multi_gpu/training/README.md new file mode 100644 index 0000000..affa49f --- /dev/null +++ b/pytorch_geometric-2.6.1/benchmark/multi_gpu/training/README.md @@ -0,0 +1,53 @@ +# Training Benchmark + +## Running benchmark on CUDA GPU + +Run benchmark, e.g. assuming you have `n` NVIDIA GPUs: + +``` +python training_benchmark_cuda.py --dataset ogbn-products --model edge_cnn --num-epochs 3 --n_gpus +``` + +## Running benchmark on Intel GPU + +### Environment setup + +### Prerequisites + +- Intel Data Center GPU Max Series. You could try it through [Intel DevCloud](https://www.intel.com/content/www/us/en/developer/tools/devcloud/services.html). +- Verify the Intel GPU Driver is installed, refer to the [guide](https://dgpu-docs.intel.com/driver/installation.html). + +### docker setup + +If you want to run your scripts inside a docker image, you could refer to the [dockerfile](https://github.com/pyg-team/pytorch_geometric/blob/master/docker/Dockerfile.xpu) and the corresponding [guide](https://github.com/pyg-team/pytorch_geometric/blob/master/docker). + +### bare-metal setup + +If you prefer to run your scripts directly on the bare-metal server. We recommend the installation guidance provided by [Intel® Extension for PyTorch](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.30%2bxpu&os=linux%2fwsl2&package=pip). The following are some key steps: + +- Install [Intel® oneAPI Base Toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html), indluding [Intel® oneAPI DPC++ Compiler](https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html), [Intel® oneAPI Math Kernel Library (oneMKL)](https://www.intel.com/content/www/us/en/docs/oneapi/programming-guide/2024-1/intel-oneapi-math-kernel-library-onemkl.html), [Intel® oneAPI Collective Communications Library (oneCCL)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/oneccl.html), and [Intel® oneCCL Bindings for PyTorch](https://github.com/intel/torch-ccl). + +```bash +# Install oneCCL package on Ubuntu +sudo apt install -y intel-oneapi-dpcpp-cpp-2024.1=2024.1.0-963 intel-oneapi-mkl-devel=2024.1.0-691 intel-oneapi-ccl-devel=2021.12.0-309 +# Install oneccl_bindings_for_pytorch +pip install oneccl_bind_pt==2.1.300+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ +# Runtime Dynamic Linking +source /opt/intel/oneapi/setvars.sh +``` + +- Install [Intel® Extension for PyTorch](https://github.com/intel/intel-extension-for-pytorch) and the corresponding version of PyTorch + +```bash +pip install torch==2.1.0.post2 intel-extension-for-pytorch==2.1.30+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ +``` + +### Running benchmark + +This [guide](https://intel.github.io/intel-extension-for-pytorch/xpu/latest/tutorials/features/DDP.html) is helpful for you to lauch DDP training on intel GPU. + +To Run benchmark, e.g. assuming you have `n` XPUs: + +``` +mpirun -np python training_benchmark_xpu.py --dataset ogbn-products --model edge_cnn --num-epochs 3 +``` diff --git a/pytorch_geometric-2.5.3/benchmark/multi_gpu/training/common.py b/pytorch_geometric-2.6.1/benchmark/multi_gpu/training/common.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/multi_gpu/training/common.py rename to pytorch_geometric-2.6.1/benchmark/multi_gpu/training/common.py diff --git a/pytorch_geometric-2.5.3/benchmark/multi_gpu/training/training_benchmark_cuda.py b/pytorch_geometric-2.6.1/benchmark/multi_gpu/training/training_benchmark_cuda.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/multi_gpu/training/training_benchmark_cuda.py rename to pytorch_geometric-2.6.1/benchmark/multi_gpu/training/training_benchmark_cuda.py diff --git a/pytorch_geometric-2.5.3/benchmark/multi_gpu/training/training_benchmark_xpu.py b/pytorch_geometric-2.6.1/benchmark/multi_gpu/training/training_benchmark_xpu.py similarity index 80% rename from pytorch_geometric-2.5.3/benchmark/multi_gpu/training/training_benchmark_xpu.py rename to pytorch_geometric-2.6.1/benchmark/multi_gpu/training/training_benchmark_xpu.py index 3009144..bf2cd0f 100644 --- a/pytorch_geometric-2.5.3/benchmark/multi_gpu/training/training_benchmark_xpu.py +++ b/pytorch_geometric-2.6.1/benchmark/multi_gpu/training/training_benchmark_xpu.py @@ -48,6 +48,15 @@ def custom_optimizer(model: Any, optimizer: Any) -> Tuple[Any, Any]: assert args.dataset in supported_sets.keys(), \ f"Dataset {args.dataset} isn't supported." - data, num_classes = get_dataset(args.dataset, args.root) + + # if the dataset is not present, it will be downloaded + # only by process with rank=0, + # other process will use the dataset cache from rank=0, + # and will not re-download and process it + if rank == 0: + data, num_classes = get_dataset(args.dataset, args.root) + dist.barrier() + if rank != 0: + data, num_classes = get_dataset(args.dataset, args.root) run(rank, world_size, args, num_classes, data, custom_optimizer) diff --git a/pytorch_geometric-2.5.3/benchmark/points/README.md b/pytorch_geometric-2.6.1/benchmark/points/README.md similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/points/README.md rename to pytorch_geometric-2.6.1/benchmark/points/README.md diff --git a/pytorch_geometric-2.5.3/benchmark/points/__init__.py b/pytorch_geometric-2.6.1/benchmark/points/__init__.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/points/__init__.py rename to pytorch_geometric-2.6.1/benchmark/points/__init__.py diff --git a/pytorch_geometric-2.5.3/benchmark/points/datasets.py b/pytorch_geometric-2.6.1/benchmark/points/datasets.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/points/datasets.py rename to pytorch_geometric-2.6.1/benchmark/points/datasets.py diff --git a/pytorch_geometric-2.5.3/benchmark/points/edge_cnn.py b/pytorch_geometric-2.6.1/benchmark/points/edge_cnn.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/points/edge_cnn.py rename to pytorch_geometric-2.6.1/benchmark/points/edge_cnn.py diff --git a/pytorch_geometric-2.5.3/benchmark/points/mpnn.py b/pytorch_geometric-2.6.1/benchmark/points/mpnn.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/points/mpnn.py rename to pytorch_geometric-2.6.1/benchmark/points/mpnn.py diff --git a/pytorch_geometric-2.5.3/benchmark/points/point_cnn.py b/pytorch_geometric-2.6.1/benchmark/points/point_cnn.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/points/point_cnn.py rename to pytorch_geometric-2.6.1/benchmark/points/point_cnn.py diff --git a/pytorch_geometric-2.5.3/benchmark/points/point_net.py b/pytorch_geometric-2.6.1/benchmark/points/point_net.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/points/point_net.py rename to pytorch_geometric-2.6.1/benchmark/points/point_net.py diff --git a/pytorch_geometric-2.5.3/benchmark/points/spline_cnn.py b/pytorch_geometric-2.6.1/benchmark/points/spline_cnn.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/points/spline_cnn.py rename to pytorch_geometric-2.6.1/benchmark/points/spline_cnn.py diff --git a/pytorch_geometric-2.5.3/benchmark/points/statistics.py b/pytorch_geometric-2.6.1/benchmark/points/statistics.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/points/statistics.py rename to pytorch_geometric-2.6.1/benchmark/points/statistics.py diff --git a/pytorch_geometric-2.5.3/benchmark/points/train_eval.py b/pytorch_geometric-2.6.1/benchmark/points/train_eval.py similarity index 97% rename from pytorch_geometric-2.5.3/benchmark/points/train_eval.py rename to pytorch_geometric-2.6.1/benchmark/points/train_eval.py index df879a5..0d9c288 100644 --- a/pytorch_geometric-2.5.3/benchmark/points/train_eval.py +++ b/pytorch_geometric-2.6.1/benchmark/points/train_eval.py @@ -31,7 +31,6 @@ def run_train(train_dataset, test_dataset, model, epochs, batch_size, torch.cuda.synchronize() elif (hasattr(torch.backends, 'mps') and torch.backends.mps.is_available()): - import torch.mps torch.mps.synchronize() t_start = time.perf_counter() @@ -43,7 +42,6 @@ def run_train(train_dataset, test_dataset, model, epochs, batch_size, torch.cuda.synchronize() elif (hasattr(torch.backends, 'mps') and torch.backends.mps.is_available()): - import torch.mps torch.mps.synchronize() t_end = time.perf_counter() @@ -65,7 +63,7 @@ def run_inference(test_dataset, model, epochs, batch_size, profiling, bf16, test_loader = DataLoader(test_dataset, batch_size, shuffle=False) if torch.cuda.is_available(): - amp = torch.cuda.amp.autocast(enabled=False) + amp = torch.amp.autocast('cuda', enabled=False) else: amp = torch.cpu.amp.autocast(enabled=bf16) diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/README.md b/pytorch_geometric-2.6.1/benchmark/runtime/README.md similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/runtime/README.md rename to pytorch_geometric-2.6.1/benchmark/runtime/README.md diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/__init__.py b/pytorch_geometric-2.6.1/benchmark/runtime/__init__.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/runtime/__init__.py rename to pytorch_geometric-2.6.1/benchmark/runtime/__init__.py diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/dgl/gat.py b/pytorch_geometric-2.6.1/benchmark/runtime/dgl/gat.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/runtime/dgl/gat.py rename to pytorch_geometric-2.6.1/benchmark/runtime/dgl/gat.py diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/dgl/gcn.py b/pytorch_geometric-2.6.1/benchmark/runtime/dgl/gcn.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/runtime/dgl/gcn.py rename to pytorch_geometric-2.6.1/benchmark/runtime/dgl/gcn.py diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/dgl/hidden.py b/pytorch_geometric-2.6.1/benchmark/runtime/dgl/hidden.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/runtime/dgl/hidden.py rename to pytorch_geometric-2.6.1/benchmark/runtime/dgl/hidden.py diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/dgl/main.py b/pytorch_geometric-2.6.1/benchmark/runtime/dgl/main.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/runtime/dgl/main.py rename to pytorch_geometric-2.6.1/benchmark/runtime/dgl/main.py diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/dgl/rgcn.py b/pytorch_geometric-2.6.1/benchmark/runtime/dgl/rgcn.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/runtime/dgl/rgcn.py rename to pytorch_geometric-2.6.1/benchmark/runtime/dgl/rgcn.py diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/dgl/train.py b/pytorch_geometric-2.6.1/benchmark/runtime/dgl/train.py similarity index 97% rename from pytorch_geometric-2.5.3/benchmark/runtime/dgl/train.py rename to pytorch_geometric-2.6.1/benchmark/runtime/dgl/train.py index 1823e1a..2bfb420 100644 --- a/pytorch_geometric-2.5.3/benchmark/runtime/dgl/train.py +++ b/pytorch_geometric-2.6.1/benchmark/runtime/dgl/train.py @@ -19,7 +19,6 @@ def train_runtime(model, data, epochs, device): if torch.cuda.is_available(): torch.cuda.synchronize() elif hasattr(torch.backends, 'mps') and torch.backends.mps.is_available(): - import torch.mps torch.mps.synchronize() t_start = time.perf_counter() diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/gat.py b/pytorch_geometric-2.6.1/benchmark/runtime/gat.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/runtime/gat.py rename to pytorch_geometric-2.6.1/benchmark/runtime/gat.py diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/gcn.py b/pytorch_geometric-2.6.1/benchmark/runtime/gcn.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/runtime/gcn.py rename to pytorch_geometric-2.6.1/benchmark/runtime/gcn.py diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/main.py b/pytorch_geometric-2.6.1/benchmark/runtime/main.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/runtime/main.py rename to pytorch_geometric-2.6.1/benchmark/runtime/main.py diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/rgcn.py b/pytorch_geometric-2.6.1/benchmark/runtime/rgcn.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/runtime/rgcn.py rename to pytorch_geometric-2.6.1/benchmark/runtime/rgcn.py diff --git a/pytorch_geometric-2.5.3/benchmark/runtime/train.py b/pytorch_geometric-2.6.1/benchmark/runtime/train.py similarity index 97% rename from pytorch_geometric-2.5.3/benchmark/runtime/train.py rename to pytorch_geometric-2.6.1/benchmark/runtime/train.py index 7dacfa5..27d0dc5 100644 --- a/pytorch_geometric-2.5.3/benchmark/runtime/train.py +++ b/pytorch_geometric-2.6.1/benchmark/runtime/train.py @@ -15,7 +15,6 @@ def train_runtime(model, data, epochs, device): if torch.cuda.is_available(): torch.cuda.synchronize() elif hasattr(torch.backends, 'mps') and torch.backends.mps.is_available(): - import torch.mps torch.mps.synchronize() t_start = time.perf_counter() diff --git a/pytorch_geometric-2.5.3/benchmark/setup.py b/pytorch_geometric-2.6.1/benchmark/setup.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/setup.py rename to pytorch_geometric-2.6.1/benchmark/setup.py diff --git a/pytorch_geometric-2.5.3/benchmark/training/README.md b/pytorch_geometric-2.6.1/benchmark/training/README.md similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/training/README.md rename to pytorch_geometric-2.6.1/benchmark/training/README.md diff --git a/pytorch_geometric-2.5.3/benchmark/training/training_benchmark.py b/pytorch_geometric-2.6.1/benchmark/training/training_benchmark.py similarity index 99% rename from pytorch_geometric-2.5.3/benchmark/training/training_benchmark.py rename to pytorch_geometric-2.6.1/benchmark/training/training_benchmark.py index 6c65a94..94e0ac3 100644 --- a/pytorch_geometric-2.5.3/benchmark/training/training_benchmark.py +++ b/pytorch_geometric-2.6.1/benchmark/training/training_benchmark.py @@ -132,7 +132,7 @@ def run(args: argparse.ArgumentParser): if args.device == 'cpu': amp = torch.cpu.amp.autocast(enabled=args.bf16) elif args.device == 'cuda': - amp = torch.cuda.amp.autocast(enabled=False) + amp = torch.amp.autocast('cuda', enabled=False) elif args.device == 'xpu': amp = torch.xpu.amp.autocast(enabled=False) else: diff --git a/pytorch_geometric-2.5.3/benchmark/utils/__init__.py b/pytorch_geometric-2.6.1/benchmark/utils/__init__.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/utils/__init__.py rename to pytorch_geometric-2.6.1/benchmark/utils/__init__.py diff --git a/pytorch_geometric-2.5.3/benchmark/utils/hetero_gat.py b/pytorch_geometric-2.6.1/benchmark/utils/hetero_gat.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/utils/hetero_gat.py rename to pytorch_geometric-2.6.1/benchmark/utils/hetero_gat.py diff --git a/pytorch_geometric-2.5.3/benchmark/utils/hetero_sage.py b/pytorch_geometric-2.6.1/benchmark/utils/hetero_sage.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/utils/hetero_sage.py rename to pytorch_geometric-2.6.1/benchmark/utils/hetero_sage.py diff --git a/pytorch_geometric-2.5.3/benchmark/utils/utils.py b/pytorch_geometric-2.6.1/benchmark/utils/utils.py similarity index 100% rename from pytorch_geometric-2.5.3/benchmark/utils/utils.py rename to pytorch_geometric-2.6.1/benchmark/utils/utils.py diff --git a/pytorch_geometric-2.5.3/codecov.yml b/pytorch_geometric-2.6.1/codecov.yml similarity index 100% rename from pytorch_geometric-2.5.3/codecov.yml rename to pytorch_geometric-2.6.1/codecov.yml diff --git a/pytorch_geometric-2.5.3/conda/pyg/README.md b/pytorch_geometric-2.6.1/conda/pyg/README.md similarity index 100% rename from pytorch_geometric-2.5.3/conda/pyg/README.md rename to pytorch_geometric-2.6.1/conda/pyg/README.md diff --git a/pytorch_geometric-2.5.3/conda/pyg/build_conda.sh b/pytorch_geometric-2.6.1/conda/pyg/build_conda.sh similarity index 100% rename from pytorch_geometric-2.5.3/conda/pyg/build_conda.sh rename to pytorch_geometric-2.6.1/conda/pyg/build_conda.sh diff --git a/pytorch_geometric-2.5.3/conda/pyg/meta.yaml b/pytorch_geometric-2.6.1/conda/pyg/meta.yaml similarity index 83% rename from pytorch_geometric-2.5.3/conda/pyg/meta.yaml rename to pytorch_geometric-2.6.1/conda/pyg/meta.yaml index f23bfff..ec2855e 100644 --- a/pytorch_geometric-2.5.3/conda/pyg/meta.yaml +++ b/pytorch_geometric-2.6.1/conda/pyg/meta.yaml @@ -1,9 +1,9 @@ package: name: pyg - version: 2.5.0 + version: 2.5.2 source: - url: https://files.pythonhosted.org/packages/e6/6e/a596e2ddecc3b13a0d576495369a30309fb54c74fadf0bbca645bfbcaa2f/torch_geometric-2.4.0.tar.gz + url: https://files.pythonhosted.org/packages/2b/52/e6d298d328858aaebf91ca78d81195e3ccaa99ba3b33b0ffc0af5ec0c86d/torch_geometric-2.5.2.tar.gz requirements: host: @@ -24,7 +24,6 @@ requirements: - scipy - aiohttp - requests - - scikit-learn build: string: py{{ environ.get('PYTHON_VERSION').replace('.', '') }}_torch_{{ environ['TORCH_VERSION'] }}_{{ environ['CUDA_VERSION'] }} diff --git a/pytorch_geometric-2.5.3/conda/pytorch-geometric/README.md b/pytorch_geometric-2.6.1/conda/pytorch-geometric/README.md similarity index 100% rename from pytorch_geometric-2.5.3/conda/pytorch-geometric/README.md rename to pytorch_geometric-2.6.1/conda/pytorch-geometric/README.md diff --git a/pytorch_geometric-2.5.3/conda/pytorch-geometric/build_conda.sh b/pytorch_geometric-2.6.1/conda/pytorch-geometric/build_conda.sh similarity index 100% rename from pytorch_geometric-2.5.3/conda/pytorch-geometric/build_conda.sh rename to pytorch_geometric-2.6.1/conda/pytorch-geometric/build_conda.sh diff --git a/pytorch_geometric-2.5.3/conda/pytorch-geometric/meta.yaml b/pytorch_geometric-2.6.1/conda/pytorch-geometric/meta.yaml similarity index 83% rename from pytorch_geometric-2.5.3/conda/pytorch-geometric/meta.yaml rename to pytorch_geometric-2.6.1/conda/pytorch-geometric/meta.yaml index 37fd7f1..9a8dce8 100644 --- a/pytorch_geometric-2.5.3/conda/pytorch-geometric/meta.yaml +++ b/pytorch_geometric-2.6.1/conda/pytorch-geometric/meta.yaml @@ -1,9 +1,9 @@ package: name: pytorch-geometric - version: 2.5.0 + version: 2.5.2 source: - url: https://files.pythonhosted.org/packages/e6/6e/a596e2ddecc3b13a0d576495369a30309fb54c74fadf0bbca645bfbcaa2f/torch_geometric-2.4.0.tar.gz + url: https://files.pythonhosted.org/packages/2b/52/e6d298d328858aaebf91ca78d81195e3ccaa99ba3b33b0ffc0af5ec0c86d/torch_geometric-2.5.2.tar.gz requirements: host: @@ -24,7 +24,6 @@ requirements: - scipy - aiohttp - requests - - scikit-learn build: string: py{{ environ.get('PYTHON_VERSION').replace('.', '') }}_torch_{{ environ['TORCH_VERSION'] }}_{{ environ['CUDA_VERSION'] }} diff --git a/pytorch_geometric-2.5.3/docker/Dockerfile b/pytorch_geometric-2.6.1/docker/Dockerfile similarity index 100% rename from pytorch_geometric-2.5.3/docker/Dockerfile rename to pytorch_geometric-2.6.1/docker/Dockerfile diff --git a/pytorch_geometric-2.6.1/docker/Dockerfile.xpu b/pytorch_geometric-2.6.1/docker/Dockerfile.xpu new file mode 100644 index 0000000..0cf402e --- /dev/null +++ b/pytorch_geometric-2.6.1/docker/Dockerfile.xpu @@ -0,0 +1,31 @@ +ARG BASE_IMAGE="intel/intel-extension-for-pytorch" +ARG BASE_TAG="2.1.30-xpu" + +FROM ${BASE_IMAGE}:${BASE_TAG} + +# meta information +LABEL org.opencontainers.image.version = "2.3.1" +LABEL org.opencontainers.image.authors = "PyG authors" +LABEL org.opencontainers.image.source = "https://github.com/pyg-team/pytorch_geometric" +LABEL org.opencontainers.image.licenses = "MIT" +LABEL org.opencontainers.image.base.name=${BASE_IMAGE}:${BASE_TAG} + +# Create a working directory +RUN mkdir /app +WORKDIR /app + +# Add the XPU-related package repository for the LTS releases +RUN . /etc/os-release && \ + wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ + sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \ + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu ${VERSION_CODENAME}/lts/2350 unified" | \ + sudo tee /etc/apt/sources.list.d/intel-gpu-${VERSION_CODENAME}.list + +# Install oneCCL +RUN sudo apt update && apt install -y intel-oneapi-ccl-devel=2021.12.0-309 python3-dev cmake vim +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_geometric diff --git a/pytorch_geometric-2.5.3/docker/README.md b/pytorch_geometric-2.6.1/docker/README.md similarity index 68% rename from pytorch_geometric-2.5.3/docker/README.md rename to pytorch_geometric-2.6.1/docker/README.md index 8cedd98..b20ef80 100644 --- a/pytorch_geometric-2.5.3/docker/README.md +++ b/pytorch_geometric-2.6.1/docker/README.md @@ -1,13 +1,25 @@ -# Docker +# Docker on NVIDIA GPU + +The recommended way to use Docker for NVIDIA hardware is described [here](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pyg). + +You can also run PyG with CUDA 12.1 inside a docker image. This method is deprecated and we highly recommend the above mentioned official NVIDIA docker containers instead. -You can run PyG with CUDA 10.1 inside a docker image. The creation of [our dockerfile](https://github.com/pyg-team/pytorch_geometric/blob/master/docker/Dockerfile) refers to the dockerfiles provided by [NVIDIA](https://gitlab.com/nvidia/cuda/tree/ubuntu18.04) and [PyTorch](https://github.com/anibali/docker-pytorch). 1. Download the dockerfile to your host server. 1. `$ docker build -t "custom image name"` 1. `$ docker run --rm -it --init --runtime=nvidia --ipc=host --network=host --volume=$PWD:/app -e NVIDIA_VISIBLE_DEVICES=0 "custom image name" /bin/bash` -If you encounter any problems, please feel free to contact . +If you encounter any problems, please feel free to create a GitHub issue. + +# Docker on Intel GPU + +You can also run PyG with Intel GPU inside a docker image. +The creation of [our dockerfile](https://github.com/pyg-team/pytorch_geometric/blob/master/docker/Dockerfile.xpu) refers to the dockerfiles provided by [Intel](https://github.com/intel/intel-extension-for-pytorch/blob/xpu-main/docker/Dockerfile.prebuilt) and the installation guidance provided by [Intel® Extension for PyTorch](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.30%2bxpu&os=linux%2fwsl2&package=pip). + +1. Download the dockerfile to your host server. +1. `$ docker build -f docker/Dockerfile.xpu -t "custom image name"` +1. `$ docker run --rm -it --ipc=host -v /dev/dri:/dev/dri --volume=$PWD:/app "custom image name" /bin/bash` # Singularity diff --git a/pytorch_geometric-2.5.3/docker/singularity b/pytorch_geometric-2.6.1/docker/singularity similarity index 100% rename from pytorch_geometric-2.5.3/docker/singularity rename to pytorch_geometric-2.6.1/docker/singularity diff --git a/pytorch_geometric-2.5.3/docs/Makefile b/pytorch_geometric-2.6.1/docs/Makefile similarity index 100% rename from pytorch_geometric-2.5.3/docs/Makefile rename to pytorch_geometric-2.6.1/docs/Makefile diff --git a/pytorch_geometric-2.5.3/docs/README.md b/pytorch_geometric-2.6.1/docs/README.md similarity index 100% rename from pytorch_geometric-2.5.3/docs/README.md rename to pytorch_geometric-2.6.1/docs/README.md diff --git a/pytorch_geometric-2.5.3/docs/requirements.txt b/pytorch_geometric-2.6.1/docs/requirements.txt similarity index 94% rename from pytorch_geometric-2.5.3/docs/requirements.txt rename to pytorch_geometric-2.6.1/docs/requirements.txt index d11fab3..3d43746 100644 --- a/pytorch_geometric-2.5.3/docs/requirements.txt +++ b/pytorch_geometric-2.6.1/docs/requirements.txt @@ -1,4 +1,3 @@ https://download.pytorch.org/whl/cpu/torch-1.13.0%2Bcpu-cp38-cp38-linux_x86_64.whl numpy>=1.19.5 -nbsphinx git+https://github.com/pyg-team/pyg_sphinx_theme.git diff --git a/pytorch_geometric-2.6.1/docs/source/.gitignore b/pytorch_geometric-2.6.1/docs/source/.gitignore new file mode 100644 index 0000000..9ab870d --- /dev/null +++ b/pytorch_geometric-2.6.1/docs/source/.gitignore @@ -0,0 +1 @@ +generated/ diff --git a/pytorch_geometric-2.6.1/docs/source/_figures/.gitignore b/pytorch_geometric-2.6.1/docs/source/_figures/.gitignore new file mode 100644 index 0000000..3eec47d --- /dev/null +++ b/pytorch_geometric-2.6.1/docs/source/_figures/.gitignore @@ -0,0 +1,3 @@ +*.aux +*.log +*.pdf diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/architecture.svg b/pytorch_geometric-2.6.1/docs/source/_figures/architecture.svg similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/architecture.svg rename to pytorch_geometric-2.6.1/docs/source/_figures/architecture.svg diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/build.sh b/pytorch_geometric-2.6.1/docs/source/_figures/build.sh similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/build.sh rename to pytorch_geometric-2.6.1/docs/source/_figures/build.sh diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/dist_part.png b/pytorch_geometric-2.6.1/docs/source/_figures/dist_part.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/dist_part.png rename to pytorch_geometric-2.6.1/docs/source/_figures/dist_part.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/dist_proc.png b/pytorch_geometric-2.6.1/docs/source/_figures/dist_proc.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/dist_proc.png rename to pytorch_geometric-2.6.1/docs/source/_figures/dist_proc.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/dist_sampling.png b/pytorch_geometric-2.6.1/docs/source/_figures/dist_sampling.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/dist_sampling.png rename to pytorch_geometric-2.6.1/docs/source/_figures/dist_sampling.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/graph.svg b/pytorch_geometric-2.6.1/docs/source/_figures/graph.svg similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/graph.svg rename to pytorch_geometric-2.6.1/docs/source/_figures/graph.svg diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/graph.tex b/pytorch_geometric-2.6.1/docs/source/_figures/graph.tex similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/graph.tex rename to pytorch_geometric-2.6.1/docs/source/_figures/graph.tex diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/graphgym_design_space.png b/pytorch_geometric-2.6.1/docs/source/_figures/graphgym_design_space.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/graphgym_design_space.png rename to pytorch_geometric-2.6.1/docs/source/_figures/graphgym_design_space.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/graphgym_evaluation.png b/pytorch_geometric-2.6.1/docs/source/_figures/graphgym_evaluation.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/graphgym_evaluation.png rename to pytorch_geometric-2.6.1/docs/source/_figures/graphgym_evaluation.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/graphgym_results.png b/pytorch_geometric-2.6.1/docs/source/_figures/graphgym_results.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/graphgym_results.png rename to pytorch_geometric-2.6.1/docs/source/_figures/graphgym_results.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/hg_example.svg b/pytorch_geometric-2.6.1/docs/source/_figures/hg_example.svg similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/hg_example.svg rename to pytorch_geometric-2.6.1/docs/source/_figures/hg_example.svg diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/hg_example.tex b/pytorch_geometric-2.6.1/docs/source/_figures/hg_example.tex similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/hg_example.tex rename to pytorch_geometric-2.6.1/docs/source/_figures/hg_example.tex diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/intel_kumo.png b/pytorch_geometric-2.6.1/docs/source/_figures/intel_kumo.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/intel_kumo.png rename to pytorch_geometric-2.6.1/docs/source/_figures/intel_kumo.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/point_cloud1.png b/pytorch_geometric-2.6.1/docs/source/_figures/point_cloud1.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/point_cloud1.png rename to pytorch_geometric-2.6.1/docs/source/_figures/point_cloud1.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/point_cloud2.png b/pytorch_geometric-2.6.1/docs/source/_figures/point_cloud2.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/point_cloud2.png rename to pytorch_geometric-2.6.1/docs/source/_figures/point_cloud2.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/point_cloud3.png b/pytorch_geometric-2.6.1/docs/source/_figures/point_cloud3.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/point_cloud3.png rename to pytorch_geometric-2.6.1/docs/source/_figures/point_cloud3.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/point_cloud4.png b/pytorch_geometric-2.6.1/docs/source/_figures/point_cloud4.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/point_cloud4.png rename to pytorch_geometric-2.6.1/docs/source/_figures/point_cloud4.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/remote_1.png b/pytorch_geometric-2.6.1/docs/source/_figures/remote_1.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/remote_1.png rename to pytorch_geometric-2.6.1/docs/source/_figures/remote_1.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/remote_2.png b/pytorch_geometric-2.6.1/docs/source/_figures/remote_2.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/remote_2.png rename to pytorch_geometric-2.6.1/docs/source/_figures/remote_2.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/remote_3.png b/pytorch_geometric-2.6.1/docs/source/_figures/remote_3.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/remote_3.png rename to pytorch_geometric-2.6.1/docs/source/_figures/remote_3.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/shallow_node_embeddings.png b/pytorch_geometric-2.6.1/docs/source/_figures/shallow_node_embeddings.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/shallow_node_embeddings.png rename to pytorch_geometric-2.6.1/docs/source/_figures/shallow_node_embeddings.png diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/to_hetero.svg b/pytorch_geometric-2.6.1/docs/source/_figures/to_hetero.svg similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/to_hetero.svg rename to pytorch_geometric-2.6.1/docs/source/_figures/to_hetero.svg diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/to_hetero.tex b/pytorch_geometric-2.6.1/docs/source/_figures/to_hetero.tex similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/to_hetero.tex rename to pytorch_geometric-2.6.1/docs/source/_figures/to_hetero.tex diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/to_hetero_with_bases.svg b/pytorch_geometric-2.6.1/docs/source/_figures/to_hetero_with_bases.svg similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/to_hetero_with_bases.svg rename to pytorch_geometric-2.6.1/docs/source/_figures/to_hetero_with_bases.svg diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/to_hetero_with_bases.tex b/pytorch_geometric-2.6.1/docs/source/_figures/to_hetero_with_bases.tex similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/to_hetero_with_bases.tex rename to pytorch_geometric-2.6.1/docs/source/_figures/to_hetero_with_bases.tex diff --git a/pytorch_geometric-2.5.3/docs/source/_figures/training_affinity.png b/pytorch_geometric-2.6.1/docs/source/_figures/training_affinity.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_figures/training_affinity.png rename to pytorch_geometric-2.6.1/docs/source/_figures/training_affinity.png diff --git a/pytorch_geometric-2.5.3/docs/source/_static/js/version_alert.js b/pytorch_geometric-2.6.1/docs/source/_static/js/version_alert.js similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_static/js/version_alert.js rename to pytorch_geometric-2.6.1/docs/source/_static/js/version_alert.js diff --git a/pytorch_geometric-2.5.3/docs/source/_static/thumbnails/create_dataset.png b/pytorch_geometric-2.6.1/docs/source/_static/thumbnails/create_dataset.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_static/thumbnails/create_dataset.png rename to pytorch_geometric-2.6.1/docs/source/_static/thumbnails/create_dataset.png diff --git a/pytorch_geometric-2.5.3/docs/source/_static/thumbnails/create_gnn.png b/pytorch_geometric-2.6.1/docs/source/_static/thumbnails/create_gnn.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_static/thumbnails/create_gnn.png rename to pytorch_geometric-2.6.1/docs/source/_static/thumbnails/create_gnn.png diff --git a/pytorch_geometric-2.5.3/docs/source/_static/thumbnails/distributed_pyg.png b/pytorch_geometric-2.6.1/docs/source/_static/thumbnails/distributed_pyg.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_static/thumbnails/distributed_pyg.png rename to pytorch_geometric-2.6.1/docs/source/_static/thumbnails/distributed_pyg.png diff --git a/pytorch_geometric-2.5.3/docs/source/_static/thumbnails/explain.png b/pytorch_geometric-2.6.1/docs/source/_static/thumbnails/explain.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_static/thumbnails/explain.png rename to pytorch_geometric-2.6.1/docs/source/_static/thumbnails/explain.png diff --git a/pytorch_geometric-2.5.3/docs/source/_static/thumbnails/heterogeneous.png b/pytorch_geometric-2.6.1/docs/source/_static/thumbnails/heterogeneous.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_static/thumbnails/heterogeneous.png rename to pytorch_geometric-2.6.1/docs/source/_static/thumbnails/heterogeneous.png diff --git a/pytorch_geometric-2.5.3/docs/source/_static/thumbnails/load_csv.png b/pytorch_geometric-2.6.1/docs/source/_static/thumbnails/load_csv.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_static/thumbnails/load_csv.png rename to pytorch_geometric-2.6.1/docs/source/_static/thumbnails/load_csv.png diff --git a/pytorch_geometric-2.5.3/docs/source/_static/thumbnails/multi_gpu_vanilla.png b/pytorch_geometric-2.6.1/docs/source/_static/thumbnails/multi_gpu_vanilla.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_static/thumbnails/multi_gpu_vanilla.png rename to pytorch_geometric-2.6.1/docs/source/_static/thumbnails/multi_gpu_vanilla.png diff --git a/pytorch_geometric-2.5.3/docs/source/_static/thumbnails/neighbor_loader.png b/pytorch_geometric-2.6.1/docs/source/_static/thumbnails/neighbor_loader.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_static/thumbnails/neighbor_loader.png rename to pytorch_geometric-2.6.1/docs/source/_static/thumbnails/neighbor_loader.png diff --git a/pytorch_geometric-2.5.3/docs/source/_static/thumbnails/point_cloud.png b/pytorch_geometric-2.6.1/docs/source/_static/thumbnails/point_cloud.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_static/thumbnails/point_cloud.png rename to pytorch_geometric-2.6.1/docs/source/_static/thumbnails/point_cloud.png diff --git a/pytorch_geometric-2.5.3/docs/source/_static/thumbnails/shallow_node_embeddings.png b/pytorch_geometric-2.6.1/docs/source/_static/thumbnails/shallow_node_embeddings.png similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_static/thumbnails/shallow_node_embeddings.png rename to pytorch_geometric-2.6.1/docs/source/_static/thumbnails/shallow_node_embeddings.png diff --git a/pytorch_geometric-2.5.3/docs/source/_templates/autosummary/class.rst b/pytorch_geometric-2.6.1/docs/source/_templates/autosummary/class.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_templates/autosummary/class.rst rename to pytorch_geometric-2.6.1/docs/source/_templates/autosummary/class.rst diff --git a/pytorch_geometric-2.5.3/docs/source/_templates/autosummary/inherited_class.rst b/pytorch_geometric-2.6.1/docs/source/_templates/autosummary/inherited_class.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_templates/autosummary/inherited_class.rst rename to pytorch_geometric-2.6.1/docs/source/_templates/autosummary/inherited_class.rst diff --git a/pytorch_geometric-2.5.3/docs/source/_templates/autosummary/metrics.rst b/pytorch_geometric-2.6.1/docs/source/_templates/autosummary/metrics.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_templates/autosummary/metrics.rst rename to pytorch_geometric-2.6.1/docs/source/_templates/autosummary/metrics.rst diff --git a/pytorch_geometric-2.5.3/docs/source/_templates/autosummary/nn.rst b/pytorch_geometric-2.6.1/docs/source/_templates/autosummary/nn.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_templates/autosummary/nn.rst rename to pytorch_geometric-2.6.1/docs/source/_templates/autosummary/nn.rst diff --git a/pytorch_geometric-2.5.3/docs/source/_templates/autosummary/only_class.rst b/pytorch_geometric-2.6.1/docs/source/_templates/autosummary/only_class.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/_templates/autosummary/only_class.rst rename to pytorch_geometric-2.6.1/docs/source/_templates/autosummary/only_class.rst diff --git a/pytorch_geometric-2.5.3/docs/source/advanced/batching.rst b/pytorch_geometric-2.6.1/docs/source/advanced/batching.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/advanced/batching.rst rename to pytorch_geometric-2.6.1/docs/source/advanced/batching.rst diff --git a/pytorch_geometric-2.5.3/docs/source/advanced/compile.rst b/pytorch_geometric-2.6.1/docs/source/advanced/compile.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/advanced/compile.rst rename to pytorch_geometric-2.6.1/docs/source/advanced/compile.rst diff --git a/pytorch_geometric-2.5.3/docs/source/advanced/cpu_affinity.rst b/pytorch_geometric-2.6.1/docs/source/advanced/cpu_affinity.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/advanced/cpu_affinity.rst rename to pytorch_geometric-2.6.1/docs/source/advanced/cpu_affinity.rst diff --git a/pytorch_geometric-2.5.3/docs/source/advanced/graphgym.rst b/pytorch_geometric-2.6.1/docs/source/advanced/graphgym.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/advanced/graphgym.rst rename to pytorch_geometric-2.6.1/docs/source/advanced/graphgym.rst diff --git a/pytorch_geometric-2.5.3/docs/source/advanced/hgam.rst b/pytorch_geometric-2.6.1/docs/source/advanced/hgam.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/advanced/hgam.rst rename to pytorch_geometric-2.6.1/docs/source/advanced/hgam.rst diff --git a/pytorch_geometric-2.5.3/docs/source/advanced/jit.rst b/pytorch_geometric-2.6.1/docs/source/advanced/jit.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/advanced/jit.rst rename to pytorch_geometric-2.6.1/docs/source/advanced/jit.rst diff --git a/pytorch_geometric-2.5.3/docs/source/advanced/remote.rst b/pytorch_geometric-2.6.1/docs/source/advanced/remote.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/advanced/remote.rst rename to pytorch_geometric-2.6.1/docs/source/advanced/remote.rst diff --git a/pytorch_geometric-2.5.3/docs/source/advanced/sparse_tensor.rst b/pytorch_geometric-2.6.1/docs/source/advanced/sparse_tensor.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/advanced/sparse_tensor.rst rename to pytorch_geometric-2.6.1/docs/source/advanced/sparse_tensor.rst diff --git a/pytorch_geometric-2.5.3/docs/source/cheatsheet/data_cheatsheet.rst b/pytorch_geometric-2.6.1/docs/source/cheatsheet/data_cheatsheet.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/cheatsheet/data_cheatsheet.rst rename to pytorch_geometric-2.6.1/docs/source/cheatsheet/data_cheatsheet.rst diff --git a/pytorch_geometric-2.5.3/docs/source/cheatsheet/gnn_cheatsheet.rst b/pytorch_geometric-2.6.1/docs/source/cheatsheet/gnn_cheatsheet.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/cheatsheet/gnn_cheatsheet.rst rename to pytorch_geometric-2.6.1/docs/source/cheatsheet/gnn_cheatsheet.rst diff --git a/pytorch_geometric-2.5.3/docs/source/conf.py b/pytorch_geometric-2.6.1/docs/source/conf.py similarity index 99% rename from pytorch_geometric-2.5.3/docs/source/conf.py rename to pytorch_geometric-2.6.1/docs/source/conf.py index 95b20e2..762f800 100644 --- a/pytorch_geometric-2.5.3/docs/source/conf.py +++ b/pytorch_geometric-2.6.1/docs/source/conf.py @@ -20,6 +20,7 @@ 'sphinx.ext.mathjax', 'sphinx.ext.napoleon', 'sphinx.ext.viewcode', + 'sphinx_copybutton', 'nbsphinx', 'pyg', ] diff --git a/pytorch_geometric-2.5.3/docs/source/external/resources.rst b/pytorch_geometric-2.6.1/docs/source/external/resources.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/external/resources.rst rename to pytorch_geometric-2.6.1/docs/source/external/resources.rst diff --git a/pytorch_geometric-2.5.3/docs/source/get_started/colabs.rst b/pytorch_geometric-2.6.1/docs/source/get_started/colabs.rst similarity index 100% rename from pytorch_geometric-2.5.3/docs/source/get_started/colabs.rst rename to pytorch_geometric-2.6.1/docs/source/get_started/colabs.rst diff --git a/pytorch_geometric-2.5.3/docs/source/get_started/introduction.rst b/pytorch_geometric-2.6.1/docs/source/get_started/introduction.rst similarity index 98% rename from pytorch_geometric-2.5.3/docs/source/get_started/introduction.rst rename to pytorch_geometric-2.6.1/docs/source/get_started/introduction.rst index c26629d..058e24a 100644 --- a/pytorch_geometric-2.5.3/docs/source/get_started/introduction.rst +++ b/pytorch_geometric-2.6.1/docs/source/get_started/introduction.rst @@ -129,7 +129,7 @@ You can find a complete list of all methods at :class:`torch_geometric.data.Data Common Benchmark Datasets ------------------------- -:pyg:`PyG` contains a large number of common benchmark datasets, *e.g.*, all Planetoid datasets (Cora, Citeseer, Pubmed), all graph classification datasets from `http://graphkernels.cs.tu-dortmund.de `_ and their `cleaned versions `_, the QM7 and QM9 dataset, and a handful of 3D mesh/point cloud datasets like FAUST, ModelNet10/40 and ShapeNet. +:pyg:`PyG` contains a large number of common benchmark datasets, *e.g.*, all Planetoid datasets (Cora, Citeseer, Pubmed), all graph classification datasets from `TUDatasets `_ and their `cleaned versions `_, the QM7 and QM9 dataset, and a handful of 3D mesh/point cloud datasets like FAUST, ModelNet10/40 and ShapeNet. Initializing a dataset is straightforward. An initialization of a dataset will automatically download its raw files and process them to the previously described :class:`~torch_geometric.data.Data` format. diff --git a/pytorch_geometric-2.5.3/docs/source/index.rst b/pytorch_geometric-2.6.1/docs/source/index.rst similarity index 90% rename from pytorch_geometric-2.5.3/docs/source/index.rst rename to pytorch_geometric-2.6.1/docs/source/index.rst index dcef5e1..1c67eed 100644 --- a/pytorch_geometric-2.5.3/docs/source/index.rst +++ b/pytorch_geometric-2.6.1/docs/source/index.rst @@ -6,7 +6,7 @@ PyG Documentation :pyg:`null` **PyG** *(PyTorch Geometric)* is a library built upon :pytorch:`null` `PyTorch `_ to easily write and train Graph Neural Networks (GNNs) for a wide range of applications related to structured data. It consists of various methods for deep learning on graphs and other irregular structures, also known as `geometric deep learning `_, from a variety of published papers. -In addition, it consists of easy-to-use mini-batch loaders for operating on many small and single giant graphs, `multi GPU-support `_, `torch.compile `_ support, `DataPipe `_ support, a large number of common benchmark datasets (based on simple interfaces to create your own), the `GraphGym `__ experiment manager, and helpful transforms, both for learning on arbitrary graphs as well as on 3D meshes or point clouds. +In addition, it consists of easy-to-use mini-batch loaders for operating on many small and single giant graphs, `multi GPU-support `_, `torch.compile `_ support, `DataPipe `_ support, a large number of common benchmark datasets (based on simple interfaces to create your own), and helpful transforms, both for learning on arbitrary graphs as well as on 3D meshes or point clouds. .. slack_button:: diff --git a/pytorch_geometric-2.5.3/docs/source/install/installation.rst b/pytorch_geometric-2.6.1/docs/source/install/installation.rst similarity index 91% rename from pytorch_geometric-2.5.3/docs/source/install/installation.rst rename to pytorch_geometric-2.6.1/docs/source/install/installation.rst index e649e0f..8ad6c78 100644 --- a/pytorch_geometric-2.5.3/docs/source/install/installation.rst +++ b/pytorch_geometric-2.6.1/docs/source/install/installation.rst @@ -27,6 +27,12 @@ Given that you have :pytorch:`PyTorch` installed (:obj:`>=1.11.0`), simply run .. warning:: Conda packages are currently not available for Windows and M1/M2/M3 macs. +If :conda:`null` :obj:`conda` does not pick up the correct CUDA version of :pyg:`PyG`, you can enforce it as follows: + +.. code-block:: none + + conda install pyg=*=*cu* -c pyg + Installation via PyPi --------------------- @@ -61,19 +67,19 @@ For ease of installation of these extensions, we provide :obj:`pip` wheels for t Wheels are currently not available for M1/M2/M3 macs. Please install the extension packages `from source `__. -#. Ensure that at least :pytorch:`PyTorch` 1.11.0 is installed: +#. Ensure that at least :pytorch:`PyTorch` 1.13.0 is installed: .. code-block:: none python -c "import torch; print(torch.__version__)" - >>> 2.2.0 + >>> 2.4.0 #. Find the CUDA version :pytorch:`PyTorch` was installed with: .. code-block:: none python -c "import torch; print(torch.version.cuda)" - >>> 12.1 + >>> 12.4 #. Install the relevant packages: @@ -83,24 +89,26 @@ 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.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.2.* and CUDA 12.1, type: + For example, for :pytorch:`PyTorch` 2.4.* 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.2.0+cu121.html + 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 - For example, for :pytorch:`PyTorch` 2.1.* and CUDA 11.8, type: + For example, for :pytorch:`PyTorch` 2.3.* 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.1.0+cu118.html + 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 -**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, and 2.0.0 (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, and 2.2.0/2.2.1/2.2.2 (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 `__. diff --git a/pytorch_geometric-2.5.3/docs/source/install/quick-start.html b/pytorch_geometric-2.6.1/docs/source/install/quick-start.html similarity index 84% rename from pytorch_geometric-2.5.3/docs/source/install/quick-start.html rename to pytorch_geometric-2.6.1/docs/source/install/quick-start.html index 0d16009..5aebbc3 100644 --- a/pytorch_geometric-2.5.3/docs/source/install/quick-start.html +++ b/pytorch_geometric-2.6.1/docs/source/install/quick-start.html @@ -75,9 +75,9 @@