In this notebook a Graph Isomorphism Network (GIN) is used to perform graph classification for molecular property prediction. The model has been optimised for Graphcore's IPU.
Run our GIN training on Paperspace.
Framework | Domain | Model | Datasets | Tasks | Training | Inference | Reference |
---|---|---|---|---|---|---|---|
PyTorch | GNNs | GIN | NCI1 | Graph Classification | ✅ Min. 4 IPUs (POD4) required |
❌ |
Graph Isomorphism Network |
-
Install and enable the Poplar SDK (see Poplar SDK setup)
-
Install the system and Python requirements (see Environment setup)
-
Run the Jupyter notebook (see Running the notebook)
To check if your Poplar SDK has already been enabled, run:
echo $POPLAR_SDK_ENABLED
If no path is provided, then follow these steps:
- Download and unpack the Poplar SDK
- Navigate inside the unpacked Poplar SDK:
cd poplar_sdk*
- Enable the Poplar SDK with:
. enable
More detailed instructions on setting up your Poplar environment are available in the Poplar quick start guide.
To prepare your environment, follow these steps:
- Create and activate a Python3 virtual environment with your chosen name:
python3 -m venv <venv name>
source <venv name>/bin/activate
-
Navigate to the Poplar SDK root directory
-
Install the PopTorch (PyTorch) wheel:
cd <poplar sdk root dir>
pip3 install poptorch*x86_64.whl
- Install the PopTorch Geometric wheel:
cd <poplar sdk root dir>
pip3 install poptorch_geometric*.whl
-
Navigate to this example's root directory, the directory of this readme.
-
Install the Python requirements:
pip3 install -r requirements.txt
More detailed instructions on setting up your PyTorch environment are available in the PyTorch quick start guide.
- In your virtual environment, install the Jupyter notebook server:
pip3 install jupyter
- Launch a Jupyter Server on a specific port:
jupyter-notebook --no-browser --port <port number>
- Connect via SSH to your remote machine, forwarding your chosen port
ssh -NL <port number>:localhost:<port number> <your username>@<remote machine>
- Use a browser to navigate to your Jupyter server and open the
molecular_property_prediction_with_gin.ipynb
notebook.
For more details about this process, or if you need troubleshooting, see our guide on using IPUs from Jupyter notebooks.
This application is licensed under the MIT license, see the LICENSE file at the top-level of this repository.
This directory includes derived work from the powerful-gnns repository, https://github.com/weihua916/powerful-gnns by Weihua Hu, published under the MIT license