diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 4e11f97..90f2c2e 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -3,7 +3,7 @@ name: Setup inputs: python-version: required: false - default: '3.8' + default: '3.10' torch-version: required: false default: '2.3.0' diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index b3483d8..9adc689 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -47,7 +47,7 @@ jobs: - name: Install main package if: steps.changed-files-specific.outputs.only_changed != 'true' run: | - pip install -e .[docs] + pip install -e .[docs,benchmark] - name: Enable github problem matcher uses: sphinx-doc/github-problem-matcher@master diff --git a/CITATION.cff b/CITATION.cff index e69de29..4c06cde 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -0,0 +1,43 @@ +cff-version: 1.2.0 +message: "If you use this framework, please cite our paper as below." +authors: + - family-names: Liao + given-names: Ningyi + orcid: https://orcid.org/0000-0003-3176-4401 + - family-names: Liu + given-names: Haoyu + - family-names: Zhu + given-names: Zulun + - family-names: Luo + given-names: Siqiang + orcid: https://orcid.org/0000-0001-8197-0903 + - family-names: Lakshmanan + given-names: Laks + orcid: https://orcid.org/0000-0002-9775-4241 +title: "pyg_spectral" +version: 1.0.0 +date-released: 2024-05-28 +preferred-citation: + type: report + authors: + - family-names: Liao + given-names: Ningyi + orcid: https://orcid.org/0000-0003-3176-4401 + - family-names: Liu + given-names: Haoyu + - family-names: Zhu + given-names: Zulun + - family-names: Luo + given-names: Siqiang + orcid: https://orcid.org/0000-0001-8197-0903 + - family-names: Lakshmanan + given-names: Laks + orcid: https://orcid.org/0000-0002-9775-4241 + journal: "arXiv e-prints" + month: 6 + start: 1 + end: 37 + title: "Benchmarking Spectral Graph Neural Networks: A Comprehensive Study on Effectiveness and Efficiency" + issue: arXiv:2406.09675 + year: 2024 + eprint: 2406.09675 diff --git a/README.md b/README.md index eec2ef5..7f0806b 100755 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ [![Docs](https://github.com/gdmnl/Spectral-GNN-Benchmark/actions/workflows/docs.yaml/badge.svg)](https://gdmnl.github.io/Spectral-GNN-Benchmark/) [![LICENSE](https://img.shields.io/github/license/gdmnl/Spectral-GNN-Benchmark)](LICENSE) -[![Release](https://img.shields.io/github/v/release/gdmnl/Spectral-GNN-Benchmark?include_prereleases)](https://github.com/gdmnl/Spectral-GNN-Benchmark/releases) -[![Python](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fgdmnl%2FSpectral-GNN-Benchmark%2Fmain%2Fpyproject.toml)]() +[![Release](https://img.shields.io/github/v/release/gdmnl/Spectral-GNN-Benchmark?include_prereleases)](https://github.com/gdmnl/Spectral-GNN-Benchmark/releases/latest) +[![Python](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fgdmnl%2FSpectral-GNN-Benchmark%2Fmain%2Fpyproject.toml)](https://gdmnl.github.io/Spectral-GNN-Benchmark/installation.html#) `pyg_spectral` is a [PyTorch Geometric](https://pyg.org)-based framework for analyzing, implementing, and benchmarking spectral GNNs with effectiveness and efficiency evaluations. @@ -16,7 +16,7 @@ --- -[**Documentation**](https://gdmnl.github.io/Spectral-GNN-Benchmark/) | [**GitHub**](https://github.com/gdmnl/Spectral-GNN-Benchmark/) +[:mag: **Documentation**](https://gdmnl.github.io/Spectral-GNN-Benchmark/) | [:octocat: **GitHub**](https://github.com/gdmnl/Spectral-GNN-Benchmark/) | [:page_facing_up: **Paper**](https://arxiv.org/abs/2406.09675) | [:paperclip: **Cite**](CITATION.cff) - [Installation](#installation) - [Reproduce Experiments](#reproduce-experiments) @@ -198,9 +198,9 @@ out = model(x, edge_index) | **Category** | **Model** | |:------------:|:----------| -| Fixed Filter | [GCN](https://arxiv.org/abs/1609.02907), [SGC](https://arxiv.org/pdf/1902.07153), [gfNN](https://arxiv.org/pdf/1905.09550), [GZoom](https://arxiv.org/pdf/1910.02370), [S$^2$GC](https://openreview.net/pdf?id=CYO5T-YjWZV),[GLP](https://arxiv.org/pdf/1901.09993), [APPNP](https://arxiv.org/pdf/1810.05997), [GCNII](https://arxiv.org/pdf/2007.02133), [GDC](https://proceedings.neurips.cc/paper_files/paper/2019/file/23c894276a2c5a16470e6a31f4618d73-Paper.pdf), [DGC](https://arxiv.org/pdf/2102.10739), [AGP](https://arxiv.org/pdf/2106.03058), [GRAND+](https://arxiv.org/pdf/2203.06389)| -|Variable Filter|[GIN](https://arxiv.org/pdf/1810.00826), [AKGNN](https://arxiv.org/pdf/2112.04575), [DAGNN](https://dl.acm.org/doi/pdf/10.1145/3394486.3403076), [GPRGNN](https://arxiv.org/pdf/2006.07988), [ARMAGNN](https://arxiv.org/pdf/1901.01343), [ChebNet](https://papers.nips.cc/paper_files/paper/2016/file/04df4d434d481c5bb723be1b6df1ee65-Paper.pdf), [ChebNetII](https://arxiv.org/pdf/2202.03580), [HornerGCN/ClenshawGCN](https://arxiv.org/pdf/2210.16508), [BernNet](https://arxiv.org/pdf/2106.10994), [LegendreNet](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=10160025), [JacobiConv](https://arxiv.org/pdf/2205.11172), [FavardGNN/OptBasisGNN](https://arxiv.org/pdf/2302.12432)| -|Filter Bank|[AdaGNN](https://arxiv.org/pdf/2104.12840), [FBGNN](https://arxiv.org/pdf/2008.08844), [ACMGNN](https://arxiv.org/pdf/2210.07606), [FAGCN](https://arxiv.org/pdf/2101.00797), [G$^2$CN](https://proceedings.mlr.press/v162/li22h/li22h.pdf), [GNN-LF/HF](https://arxiv.org/pdf/2101.11859), [FiGURe](https://arxiv.org/pdf/2310.01892)| +| Fixed Filter | [GCN](https://arxiv.org/abs/1609.02907), [SGC](https://arxiv.org/pdf/1902.07153), [gfNN](https://arxiv.org/pdf/1905.09550), [GZoom](https://arxiv.org/pdf/1910.02370), [S²GC](https://openreview.net/pdf?id=CYO5T-YjWZV),[GLP](https://arxiv.org/pdf/1901.09993), [APPNP](https://arxiv.org/pdf/1810.05997), [GCNII](https://arxiv.org/pdf/2007.02133), [GDC](https://proceedings.neurips.cc/paper_files/paper/2019/file/23c894276a2c5a16470e6a31f4618d73-Paper.pdf), [DGC](https://arxiv.org/pdf/2102.10739), [AGP](https://arxiv.org/pdf/2106.03058), [GRAND+](https://arxiv.org/pdf/2203.06389)| +|Variable Filter|[GIN](https://arxiv.org/pdf/1810.00826), [AKGNN](https://arxiv.org/pdf/2112.04575), [DAGNN](https://dl.acm.org/doi/pdf/10.1145/3394486.3403076), [GPRGNN](https://arxiv.org/pdf/2006.07988), [ARMAGNN](https://arxiv.org/pdf/1901.01343), [ChebNet](https://papers.nips.cc/paper_files/paper/2016/file/04df4d434d481c5bb723be1b6df1ee65-Paper.pdf), [ChebNetII](https://arxiv.org/pdf/2202.03580), [HornerGCN / ClenshawGCN](https://arxiv.org/pdf/2210.16508), [BernNet](https://arxiv.org/pdf/2106.10994), [LegendreNet](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=10160025), [JacobiConv](https://arxiv.org/pdf/2205.11172), [FavardGNN / OptBasisGNN](https://arxiv.org/pdf/2302.12432)| +|Filter Bank|[AdaGNN](https://arxiv.org/pdf/2104.12840), [FBGNN](https://arxiv.org/pdf/2008.08844), [ACMGNN](https://arxiv.org/pdf/2210.07606), [FAGCN](https://arxiv.org/pdf/2101.00797), [G²CN](https://proceedings.mlr.press/v162/li22h/li22h.pdf), [GNN-LF/HF](https://arxiv.org/pdf/2101.11859), [FiGURe](https://arxiv.org/pdf/2310.01892)| ### Covered Datasets @@ -237,5 +237,5 @@ out = model(x, edge_index) ## Misc - This project is licensed under the [MIT LICENSE](LICENSE). -- Use "Cite this repository" in the right sidebar for [CITATION](docs/CITATION.cff) +- Please export [CITATION](docs/CITATION.cff) by using "Cite this repository" in the right sidebar. diff --git a/docs/source/_include/benchmark.dataset_process.rst b/docs/source/_include/benchmark.dataset_process.rst index bc0ed75..ca9d852 100644 --- a/docs/source/_include/benchmark.dataset_process.rst +++ b/docs/source/_include/benchmark.dataset_process.rst @@ -1,5 +1,5 @@ benchmark.dataset\_process -======================== +================================== .. automodule:: benchmark.dataset_process :members: diff --git a/docs/source/_include/benchmark.trainer.rst b/docs/source/_include/benchmark.trainer.rst index 35b95a8..74eab21 100644 --- a/docs/source/_include/benchmark.trainer.rst +++ b/docs/source/_include/benchmark.trainer.rst @@ -1,5 +1,5 @@ benchmark.trainer -=============== +========================= .. automodule:: benchmark.trainer :members: @@ -8,16 +8,17 @@ benchmark.trainer :private-members: benchmark.trainer.base -------------------- +------------------------------ .. automodule:: benchmark.trainer.base :members: :undoc-members: :show-inheritance: :private-members: + :no-index: benchmark.trainer.filter ---------------------- +-------------------------------- .. automodule:: benchmark.trainer.filter :members: @@ -26,7 +27,7 @@ benchmark.trainer.filter :private-members: benchmark.trainer.load\_data -------------------------- +------------------------------------ .. automodule:: benchmark.trainer.load_data :members: @@ -35,7 +36,7 @@ benchmark.trainer.load\_data :private-members: benchmark.trainer.load\_metric ---------------------------- +-------------------------------------- .. automodule:: benchmark.trainer.load_metric :members: @@ -44,7 +45,7 @@ benchmark.trainer.load\_metric :private-members: benchmark.trainer.load\_model --------------------------- +------------------------------------- .. automodule:: benchmark.trainer.load_model :members: diff --git a/docs/source/_include/benchmark.utils.rst b/docs/source/_include/benchmark.utils.rst index 5679dd1..aee0bec 100644 --- a/docs/source/_include/benchmark.utils.rst +++ b/docs/source/_include/benchmark.utils.rst @@ -1,5 +1,5 @@ benchmark.utils -============= +======================= .. automodule:: benchmark.utils :members: @@ -9,7 +9,7 @@ benchmark.utils benchmark.utils.config -------------------- +------------------------------ .. autosummary:: :recursive: diff --git a/docs/source/arrangement.md b/docs/source/_tutorial/arrangement.md similarity index 100% rename from docs/source/arrangement.md rename to docs/source/_tutorial/arrangement.md diff --git a/docs/source/customization.rst b/docs/source/_tutorial/customization.rst similarity index 100% rename from docs/source/customization.rst rename to docs/source/_tutorial/customization.rst diff --git a/docs/source/installation.rst b/docs/source/_tutorial/installation.rst similarity index 100% rename from docs/source/installation.rst rename to docs/source/_tutorial/installation.rst diff --git a/docs/source/reproduce.rst b/docs/source/_tutorial/reproduce.rst similarity index 100% rename from docs/source/reproduce.rst rename to docs/source/_tutorial/reproduce.rst diff --git a/docs/source/conf.py b/docs/source/conf.py index 3e7f4fa..b2e5755 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,8 +14,9 @@ author = 'Ningyi Liao' release = '1.0.0' -sys.path.insert(0, osp.abspath('../../')) -sys.path.insert(1, osp.abspath('../../benchmark')) +proot = osp.abspath(osp.dirname(osp.dirname(osp.dirname((osp.realpath(__file__)))))) +sys.path.insert(0, proot) +sys.path.insert(1, osp.join(proot, 'benchmark')) # sys.path.append(osp.join(osp.dirname(pyg_sphinx_theme.__file__), 'extension')) # -- General configuration --------------------------------------------------- diff --git a/docs/source/index.rst b/docs/source/index.rst index 351928c..20b6b58 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,21 +16,21 @@ pyg_spectral * **High scalability**: As spectral GNNs are inherently suitable for large-scale learning, our framework is feasible to common scalable learning schemes and acceleration techniques. Several spectral-oriented approximation algorithms are also supported. -.. include:: installation.rst +.. include:: _tutorial/installation.rst :end-before: Advanced Options For advanced options, please refer to `Installation Options `_. -.. include:: reproduce.rst +.. include:: _tutorial/reproduce.rst .. toctree:: :maxdepth: 2 :caption: Getting Started - installation - reproduce - customization - arrangement + _tutorial/installation + _tutorial/reproduce + _tutorial/customization + _tutorial/arrangement .. toctree:: :hidden: diff --git a/pyg_spectral/utils/loader.py b/pyg_spectral/utils/loader.py index fac2fd8..51a1759 100755 --- a/pyg_spectral/utils/loader.py +++ b/pyg_spectral/utils/loader.py @@ -1,7 +1,9 @@ +import importlib + def load_import(class_name, module_name): - r"""Simple hack for dynamic importing module.class""" - module = __import__(module_name, fromlist=[class_name]) + r"""Simple dynamic import for 'module.class'""" + module = importlib.import_module(module_name) class_obj = getattr(module, class_name) if isinstance(class_obj, type): return class_obj diff --git a/pyproject.toml b/pyproject.toml index 21aa2ab..92f61c0 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,8 +21,6 @@ classifiers=[ "License :: OSI Approved :: MIT License", "Environment :: GPU :: NVIDIA CUDA :: 12", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -32,7 +30,7 @@ keywords=[ "graph-neural-networks", "spectral-gnn", ] -requires-python=">=3.8" +requires-python=">=3.10" dependencies=[ "torch_geometric>=2.5.3", "pandas>=2.0",