Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amorehead/equivariant-gnns
An environment for running experiments with equivariant GNN architectures
https://github.com/amorehead/equivariant-gnns
equivariant-network neural-networks
Last synced: 13 days ago
JSON representation
An environment for running experiments with equivariant GNN architectures
- Host: GitHub
- URL: https://github.com/amorehead/equivariant-gnns
- Owner: amorehead
- License: other
- Created: 2021-02-14T00:23:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-16T21:25:54.000Z (over 3 years ago)
- Last Synced: 2024-08-06T21:20:44.688Z (3 months ago)
- Topics: equivariant-network, neural-networks
- Language: Python
- Homepage:
- Size: 271 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Equivariant-GNNs
![CI testing](https://github.com/amorehead/Equivariant-GNNs/workflows/CI%20testing/badge.svg?branch=master&event=push)
## Description
An environment for running experiments with equivariant GNN architectures
## How to run
First, install and configure Conda environment:
```bash
# Clone project:
git clone https://github.com/amorehead/Equivariant-GNNs# Change to project directory:
cd Equivariant-GNNs# (If on HPC cluster) Load 'open-ce' module
module load open-ce/0.1-0# (If on HPC cluster) Clone Conda environment into this directory using provided 'open-ce' environment:
conda create --prefix ./venv --clone open-ce-0.1-0# (If on HPC cluster - Optional) Create Conda environment in a particular directory using provided 'open-ce' environment:
conda create --prefix MY_VENV_DIR --clone open-ce-0.1-0# (Else, if on local machine) Set up Conda environment locally
conda env create --prefix ./venv -f environment.yml# (Else, if on local machine - Optional) Create Conda environment in a particular directory using local 'environment.yml' file:
conda env create --prefix MY-VENV-DIR -f environment.yml# Activate Conda environment located in the current directory:
conda activate ./venv# (Optional) Activate Conda environment located in another directory:
conda activate MY-VENV-DIR# (Optional) Deactivate the currently-activated Conda environment:
conda deactivate# (If on local machine - Optional) Perform a full update on the Conda environment described in 'environment.yml':
conda env update -f environment.yml --prune# (Optional) To remove this long prefix in your shell prompt, modify the env_prompt setting in your .condarc file with:
conda config --set env_prompt '({name})'
```(If on HPC cluster) Install all project dependencies:
```bash
# Install project as a pip dependency in the Conda environment currently activated:
pip3 install -e .# Install external pip dependencies in the Conda environment currently activated:
pip3 install -r requirements.txt# Install pip dependencies used for unit testing in the Conda environment currently activated:
pip3 install -r tests/requirements.txt
```Configure Weights and Biases (Wandb) to point to project directory for config details:
```bash
export WANDB_CONFIG_DIR=.
```Then, navigate to any file and run it:
```bash
# Run a particular module (example: Equivariant-GNNs architecture as main contribution):
python3 project/lit_egnn.py
```## Imports
This project is setup as a package which means you can now easily import any file into any other file like so:
```python
from project.datasets.RG.rg_dgl_data_module import RGDGLDataModule
from project.lit_egnn import LitEGNN
from pytorch_lightning import Trainer# Model
model = LitEGNN() # Provide model parameters here# Data
data_dir = 'final' # Specify data directory here
data_module = RGDGLDataModule(data_dir)
data_module.setup()# Train
trainer = Trainer()
trainer.fit(model, data_module.train_dataloader(), data_module.val_dataloader())# Test using the best model!
trainer.test(test_dataloaders=data_module.test_dataloader())
```### Citation
```
@article{Equivariant-GNNs,
title={Equivariant-GNNs: An environment for running experiments with equivariant GNN architectures},
author={Morehead, Alex, Chen, Chen, and Cheng, Jianlin},
journal={N/A},
year={2021}
}
```