diff --git a/doc/conf.py b/doc/conf.py index 29a8ecd4f0..eda2dfa901 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -131,10 +131,6 @@ def generate_doxygen_xml(app): else: subprocess.call("doxygen Doxyfile", shell=True) -def generate_train_input(app): - with open("train-input-auto.rst", 'w') as f: - f.write(subprocess.check_output((sys.executable, "-m", "deepmd", "doc-train-input"), universal_newlines=True)) - def run_apidoc(_): from sphinx.ext.apidoc import main import sys @@ -148,7 +144,6 @@ def setup(app): # Add hook for building doxygen xml when needed app.connect("builder-inited", generate_doxygen_xml) app.connect('builder-inited', run_apidoc) - app.connect('builder-inited', generate_train_input) # -- General configuration --------------------------------------------------- @@ -169,6 +164,7 @@ def setup(app): extensions = [ "deepmodeling_sphinx", + "dargs.sphinx", "sphinx_rtd_theme", 'myst_parser', 'sphinx.ext.autosummary', diff --git a/doc/train/train-input.rst b/doc/train/train-input.rst index 4c9c56cb31..44d511cc21 100644 --- a/doc/train/train-input.rst +++ b/doc/train/train-input.rst @@ -3,4 +3,18 @@ Training Parameters .. note:: One can load, modify, and export the input file by using our effective web-based tool `DP-GUI `_. All training parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file for furthur training. -.. include:: ../train-input-auto.rst +.. dargs:: + :module: deepmd.utils.argcheck + :func: model_args + +.. dargs:: + :module: deepmd.utils.argcheck + :func: learning_rate_args + +.. dargs:: + :module: deepmd.utils.argcheck + :func: loss_args + +.. dargs:: + :module: deepmd.utils.argcheck + :func: training_args diff --git a/setup.py b/setup.py index 2623f0f149..8d169a7e7e 100644 --- a/setup.py +++ b/setup.py @@ -127,7 +127,7 @@ cmake_minimum_required_version="3.0", extras_require={ "test": ["dpdata>=0.1.9", "ase", "pytest", "pytest-cov", "pytest-sugar"], - "docs": ["sphinx>=3.1.1", "recommonmark", "sphinx_rtd_theme>=1.0.0rc1", "sphinx_markdown_tables", "myst-parser", "breathe", "exhale", "numpydoc", "ase", "deepmodeling-sphinx"], + "docs": ["sphinx>=3.1.1", "recommonmark", "sphinx_rtd_theme>=1.0.0rc1", "sphinx_markdown_tables", "myst-parser", "breathe", "exhale", "numpydoc", "ase", "deepmodeling-sphinx", "dargs>=0.3.1"], **extras_require, }, entry_points={"console_scripts": ["dp = deepmd.entrypoints.main:main"]},