Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
theheavens 337a790755 | 2 years ago | |
---|---|---|
docs | 2 years ago | |
openhgnn | 2 years ago | |
space4hgnn | 2 years ago | |
tests | 2 years ago | |
.gitignore | 2 years ago | |
CONTRIBUTING.md | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
main.py | 2 years ago | |
requirements.txt | 2 years ago | |
setup.py | 2 years ago | |
space4hgnn.py | 2 years ago |
This is an open-source toolkit for Heterogeneous Graph Neural Network(OpenHGNN) based on DGL [Deep Graph Library] and PyTorch. We integrate SOTA models of heterogeneous graph.
1. Python environment (Optional): We recommend using Conda package manager
conda create -n openhgnn python=3.7
source activate openhgnn
2. Pytorch: Install PyTorch. For example:
# CUDA versions: cpu, cu92, cu101, cu102, cu101, cu111
pip install torch==1.8.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
3. DGL: Install DGL, follow their instructions. For example:
# CUDA versions: cpu, cu101, cu102, cu110, cu111
pip install --pre dgl-cu101 -f https://data.dgl.ai/wheels-test/repo.html
4. OpenHGNN and other dependencies:
git clone https://github.com/BUPT-GAMMA/OpenHGNN
cd OpenHGNN
pip install -r requirements.txt
python main.py -m model_name -d dataset_name -t task_name -g 0 --use_best_config --load_from_pretrained
usage: main.py [-h] [--model MODEL] [--task TASK] [--dataset DATASET]
[--gpu GPU] [--use_best_config]
optional arguments:
-h, --help
show this help message and exit
--model -m
name of models
--task -t
name of task
--dataset -d
name of datasets
--gpu -g
controls which gpu you will use. If you do not have gpu, set -g -1.
--use_best_config
use_best_config means you can use the best config in the dataset with the model. If you want to set the different hyper-parameter, modify the openhgnn.config.ini manually. The best_config will override the parameter in config.ini.
--use_hpo
Besides use_best_config, we give a hyper-parameter example to search the best hyper-parameter automatically.
--load_from_pretrained
will load the model from a default checkpoint.
e.g.:
python main.py -m GTN -d imdb4GTN -t node_classification -g 0 --use_best_config
Note: If you are interested in some model, you can refer to the below models list.
Refer to the docs to get more basic and depth usage.
The link will give some basic usage.
Model | Node classification | Link prediction | Recommendation |
---|---|---|---|
Metapath2vec[KDD 2017] | ✔️ | ||
RGCN[ESWC 2018] | ✔️ | ✔️ | |
HERec[TKDE 2018] | ✔️ | ||
HAN[WWW 2019] | ✔️ | ||
KGCN[WWW 2019] | ✔️ | ||
HetGNN[KDD 2019] | ✔️ | ✔️ | |
HGAT[EMNLP 2019] | |||
GTN[NeurIPS 2019] | ✔️ | ||
RSHN[ICDM 2019] | ✔️ | ||
DMGI[AAAI 2020] | ✔️ | ||
MAGNN[WWW 2020] | ✔️ | ||
HGT[WWW 2020] | |||
CompGCN[ICLR 2020] | ✔️ | ✔️ | |
NSHE[IJCAI 2020] | ✔️ | ||
NARS[arxiv] | ✔️ | ||
MHNF[arxiv] | ✔️ | ||
HGSL[AAAI 2021] | ✔️ | ||
HGNN-AC[WWW 2021] | ✔️ | ||
HeCo[KDD 2021] | ✔️ | ||
SimpleHGN[KDD 2021] | |||
HPN[TKDE 2021] | ✔️ | ||
RHGNN[arxiv] | ✔️ | ||
HDE[ICDM 2021] | ✔️ | ||
OpenHGNN Team[GAMMA LAB] & DGL Team.
See more in CONTRIBUTING.
This is an open-source toolkit for Heterogeneous Graph Neural Network(OpenHGNN) based on DGL.
Python Shell
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》