diff --git a/examples/contrib/README.md b/examples/contrib/README.md new file mode 100644 index 000000000000..3a45117741d2 --- /dev/null +++ b/examples/contrib/README.md @@ -0,0 +1,12 @@ +# Examples for External Contributions + +This directory contains examples demonstrating functionality included in the `torch_geometric.contrib` package. +The `contrib` package of PyG is a staging area for early-stage, experimental code. +Modules included here might be moved to the main library in the future. + +| Example | Description | +| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| [`rbcd_attack.py`](./rbcd_attack.py) | An example of the RBCD (Resource-based Critical Data) attack | +| [`rbcd_attack_poisoning.py`](./rbcd_attack_poisoning.py) | An example of the RBCD (Resource-Based Critical Data) attack with data poisoning strategies | +| [`pgm_explainer_node_classification.py`](./pgm_explainer_node_classification.py) | An example of the PGM (Probabilistic Graphical Model) explainer for node classification | +| [`pgm_explainer_graph_classification.py`](./pgm_explainer_graph_classification.py) | An example of the PGM (Probabilistic Graphical Model) explainer for graph classification | diff --git a/examples/distributed/README.md b/examples/distributed/README.md new file mode 100644 index 000000000000..5f6e928d0bf3 --- /dev/null +++ b/examples/distributed/README.md @@ -0,0 +1,7 @@ +# Examples for Distributed Graph Learning + +This directory contains examples for distributed graph learning. +The examples are organized into two subdirectories: + +1. `pyg`: Distributed training via PyG's own `torch_geometric.distributed` package. +1. `graphlearn_for_pytorch`: Distributed training via the external GraphLearn-for-PyTorch (GLT) package. diff --git a/examples/explain/README.md b/examples/explain/README.md new file mode 100644 index 000000000000..c91db8120808 --- /dev/null +++ b/examples/explain/README.md @@ -0,0 +1,13 @@ +# Examples for Generating Explanations of Graph Neural Networks + +This directory contains examples demonstrating the use of the `torch_geometric.explain` package. +The `explain` package of PyG provides a set of tools to explain the predictions of a GNN model or to explain the underlying phenomenon of a dataset. + +| Example | Description | +| ---------------------------------------------------------------------- | ------------------------------------------------------- | +| [`gnn_explainer.py`](./gnn_explainer.py) | `GNNExplainer` for node classification | +| [`gnn_explainer_link_pred.py`](./gnn_explainer_link_pred.py) | `GNNExplainer` for link prediction | +| [`gnn_explainer_ba_shapes.py`](./gnn_explainer_ba_shapes.py) | `GNNExplainer` applied on the `BAShapes` dataset | +| [`captum_explainer.py`](./captum_explainer.py) | Captum-based explainer for node classification | +| [`captum_explainer_hetero_link.py`](./captum_explainer_hetero_link.py) | Captum-based explainer for heterogenous link prediction | +| [`graphmask_explainer.py`](./graphmask_explainer.py) | `GraphMaskExplainer` for node classification | diff --git a/examples/jit/README.md b/examples/jit/README.md new file mode 100644 index 000000000000..232976619c2f --- /dev/null +++ b/examples/jit/README.md @@ -0,0 +1,10 @@ +# JIT Examples + +This directory contains examples demonstrating the use of Just-In-Time (JIT) compilation in different GNN models. + +| Example | Description | +| ---------------------- | ----------------------------------------------------------------- | +| [`gcn.py`](./gcn.py) | JIT compilation in `GCN` | +| [`gat.py`](./gat.py) | JIT compilation in `GAT` | +| [`gin.py`](./gin.py) | JIT compilation in `GIN` | +| [`film.py`](./film.py) | JIT compilation in [`GNN-FiLM`](https://arxiv.org/abs/1906.12192) | diff --git a/examples/pytorch_ignite/README.md b/examples/pytorch_ignite/README.md new file mode 100644 index 000000000000..0cd789b3f6bc --- /dev/null +++ b/examples/pytorch_ignite/README.md @@ -0,0 +1,7 @@ +# Examples for PyTorch Ignite + +This directory provides examples showcasing the integration of PyG with [PyTorch Ingite](https://pytorch.org/ignite/index.html). + +| Example | Description | +| -------------------- | ---------------------------------------------------------------- | +| [`gin.py`](./gin.py) | Demonstrates how to implement the GIN model using PyTorch Ignite | diff --git a/examples/pytorch_lightning/README.md b/examples/pytorch_lightning/README.md new file mode 100644 index 000000000000..4c9dbf8e7936 --- /dev/null +++ b/examples/pytorch_lightning/README.md @@ -0,0 +1,9 @@ +# Examples for PyTorch Lightning + +This directory provides examples showcasing the integration of PyG with [PyTorch Lightning](https://github.com/Lightning-AI/pytorch-lightning). + +| Example | Description | +| ------------------------------------------ | ------------------------------------------------------------------------------------ | +| [`graph_sage.py`](./graph_sage.py) | Combines PyG and PyTorch Lightning for node classification via the `GraphSAGE` model | +| [`gin.py`](./gin.py) | Combines PyG and PyTorch Lightning for graph classification via the `GIN` model | +| [`relational_gnn.py`](./relational_gnn.py) | Combines PyG and PyTorch Lightning for heterogeneous node classification |