From 813b00cef73ed952624e0ebff20f21c6b962716b Mon Sep 17 00:00:00 2001 From: nyLiao <39255546+nyLiao@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:43:09 +0000 Subject: [PATCH] Fix docs --- benchmark/dataset/__init__.py | 2 +- benchmark/dataset/{pyg.py => pygn.py} | 0 benchmark/run_param.py | 1 + benchmark/trainer/regression.py | 5 +++-- .../{benchmark.dataset_process.rst => benchmark.dataset.rst} | 4 ++-- docs/source/_include/benchmark.trainer.rst | 4 ++-- docs/source/index.rst | 2 +- pyproject.toml | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-) rename benchmark/dataset/{pyg.py => pygn.py} (100%) rename docs/source/_include/{benchmark.dataset_process.rst => benchmark.dataset.rst} (61%) diff --git a/benchmark/dataset/__init__.py b/benchmark/dataset/__init__.py index 0b9a0ec..13ed68d 100644 --- a/benchmark/dataset/__init__.py +++ b/benchmark/dataset/__init__.py @@ -9,7 +9,7 @@ import importlib class_list, func_list = {}, {} -for classi in ['yandex', 'linkx', 'ogbn', 'pyg']: +for classi in ['yandex', 'linkx', 'ogbn', 'pygn']: module = importlib.import_module(f".{classi}", __name__) func_list[classi] = module.get_data for datai in module.DATA_LIST: diff --git a/benchmark/dataset/pyg.py b/benchmark/dataset/pygn.py similarity index 100% rename from benchmark/dataset/pyg.py rename to benchmark/dataset/pygn.py diff --git a/benchmark/run_param.py b/benchmark/run_param.py index dd1d6f8..23f5654 100644 --- a/benchmark/run_param.py +++ b/benchmark/run_param.py @@ -174,6 +174,7 @@ def main(args): direction='maximize', sampler=optuna.samplers.TPESampler( n_startup_trials=8, + n_ei_candidates=36, multivariate=True, group=True, warn_independent_sampling=False), diff --git a/benchmark/trainer/regression.py b/benchmark/trainer/regression.py index 4dd2f58..1f61e5e 100644 --- a/benchmark/trainer/regression.py +++ b/benchmark/trainer/regression.py @@ -13,7 +13,8 @@ from .fullbatch import TrnFullbatch from .load_metric import ResCollection -from .load_data import DATAPATH, split_random +from .load_data import DATAPATH +from dataset import split_random from utils import ResLogger @@ -64,7 +65,7 @@ def __init__(self, args: Namespace, res_logger: ResLogger = None) -> None: # ===== Data acquisition def _resolve_import(self, args: Namespace) -> Tuple[str, str, dict]: assert self.data in ['2dgrid'] - module_name = 'dataset_process' + module_name = 'dataset' class_name = 'Grid2D' kwargs = dict( root=DATAPATH.joinpath('Grid2D'), diff --git a/docs/source/_include/benchmark.dataset_process.rst b/docs/source/_include/benchmark.dataset.rst similarity index 61% rename from docs/source/_include/benchmark.dataset_process.rst rename to docs/source/_include/benchmark.dataset.rst index ca9d852..9f5360d 100644 --- a/docs/source/_include/benchmark.dataset_process.rst +++ b/docs/source/_include/benchmark.dataset.rst @@ -1,7 +1,7 @@ -benchmark.dataset\_process +benchmark.dataset ================================== -.. automodule:: benchmark.dataset_process +.. automodule:: benchmark.dataset :members: :undoc-members: :show-inheritance: diff --git a/docs/source/_include/benchmark.trainer.rst b/docs/source/_include/benchmark.trainer.rst index 74eab21..d12cdb2 100644 --- a/docs/source/_include/benchmark.trainer.rst +++ b/docs/source/_include/benchmark.trainer.rst @@ -17,10 +17,10 @@ benchmark.trainer.base :private-members: :no-index: -benchmark.trainer.filter +benchmark.trainer.regression -------------------------------- -.. automodule:: benchmark.trainer.filter +.. automodule:: benchmark.trainer.regression :members: :undoc-members: :show-inheritance: diff --git a/docs/source/index.rst b/docs/source/index.rst index 2f1f7fe..ae5f579 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -58,7 +58,7 @@ For advanced options, please refer to `Installation Options <_tutorial/installat _include/benchmark.trainer _include/benchmark.utils - _include/benchmark.dataset_process + _include/benchmark.dataset .. [1] Please refer to the `official guide `__ if a specific CUDA version is required for PyTorch. diff --git a/pyproject.toml b/pyproject.toml index b52ab83..c980c2c 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ cpp=[ "eigency>=1.77", ] docs=[ - "sphinx>=5.1", + "sphinx>=7,<7.4", "sphinx_rtd_theme", "nbsphinx", "myst_parser",