-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: dpgen run machine parameters (#710)
* doc: dpgen run machine parameters * unpin sphinx Fix sphinx-doc/sphinx#10291 (comment)
- Loading branch information
Showing
7 changed files
with
78 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from dpgen.generator.arginfo import run_mdata_arginfo | ||
|
||
run_mdata_doc = run_mdata_arginfo().gen_doc() | ||
with open('run-mdata-auto.rst', 'w') as f: | ||
f.write(run_mdata_doc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
sphinx==3.2.1 | ||
recommonmark==0.7.1 | ||
sphinx_rtd_theme==0.5.2 | ||
sphinx_markdown_tables==0.0.15 | ||
myst-parser==0.13.7 | ||
sphinx>=4.0.2 | ||
recommonmark | ||
sphinx_rtd_theme | ||
sphinx_markdown_tables | ||
myst-parser | ||
deepmodeling_sphinx | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dpgen run machine parameters | ||
============================ | ||
|
||
.. include:: run-mdata-auto.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from dargs import Argument | ||
|
||
from dpgen.dispatcher.Dispatcher import mdata_arginfo | ||
|
||
def run_mdata_arginfo() -> Argument: | ||
"""Generate arginfo for dpgen run mdata. | ||
Returns | ||
------- | ||
Argument | ||
arginfo | ||
""" | ||
|
||
doc_api_version = "Please set to 1.0" | ||
doc_run_mdata = "machine.json file" | ||
arg_api_version = Argument("api_version", str, optional=False, doc=doc_api_version) | ||
|
||
sub_fields = [arg_api_version] | ||
doc_mdata = "Parameters of command, machine, and resources for %s" | ||
for task in ("train", "model_devi", "fp"): | ||
sub_fields.append(Argument( | ||
task, dict, optional=False, sub_fields=mdata_arginfo(), | ||
doc=doc_mdata % task, | ||
)) | ||
return Argument("run_mdata", dict, sub_fields=sub_fields, doc=doc_run_mdata) |