File tree Expand file tree Collapse file tree 5 files changed +58
-45
lines changed Expand file tree Collapse file tree 5 files changed +58
-45
lines changed Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: LGPL-3.0-or-later
2- """Module that prints train input arguments docstrings."""
3-
4- from deepmd .utils .argcheck import (
5- gen_doc ,
6- gen_json ,
2+ from deepmd_utils .entrypoints .doc import (
3+ doc_train_input ,
74)
85
96__all__ = ["doc_train_input" ]
10-
11-
12- def doc_train_input (* , out_type : str = "rst" , ** kwargs ):
13- """Print out trining input arguments to console."""
14- if out_type == "rst" :
15- doc_str = gen_doc (make_anchor = True )
16- elif out_type == "json" :
17- doc_str = gen_json ()
18- else :
19- raise RuntimeError ("Unsupported out type %s" % out_type )
20- print (doc_str )
Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: LGPL-3.0-or-later
2- """DP-GUI entrypoint."""
2+ from deepmd_utils .entrypoints .gui import (
3+ start_dpgui ,
4+ )
35
4-
5- def start_dpgui (* , port : int , bind_all : bool , ** kwargs ):
6- """Host DP-GUI server.
7-
8- Parameters
9- ----------
10- port : int
11- The port to serve DP-GUI on.
12- bind_all : bool
13- Serve on all public interfaces. This will expose your DP-GUI instance
14- to the network on both IPv4 and IPv6 (where available).
15- **kwargs
16- additional arguments
17-
18- Raises
19- ------
20- ModuleNotFoundError
21- The dpgui package is not installed
22- """
23- try :
24- from dpgui import (
25- start_dpgui ,
26- )
27- except ModuleNotFoundError as e :
28- raise ModuleNotFoundError (
29- "To use DP-GUI, please install the dpgui package:\n pip install dpgui"
30- ) from e
31- start_dpgui (port = port , bind_all = bind_all )
6+ __all__ = ["start_dpgui" ]
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: LGPL-3.0-or-later
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: LGPL-3.0-or-later
2+ """Module that prints train input arguments docstrings."""
3+
4+ from deepmd_utils .utils .argcheck import (
5+ gen_doc ,
6+ gen_json ,
7+ )
8+
9+ __all__ = ["doc_train_input" ]
10+
11+
12+ def doc_train_input (* , out_type : str = "rst" , ** kwargs ):
13+ """Print out trining input arguments to console."""
14+ if out_type == "rst" :
15+ doc_str = gen_doc (make_anchor = True )
16+ elif out_type == "json" :
17+ doc_str = gen_json ()
18+ else :
19+ raise RuntimeError ("Unsupported out type %s" % out_type )
20+ print (doc_str )
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: LGPL-3.0-or-later
2+ """DP-GUI entrypoint."""
3+
4+
5+ def start_dpgui (* , port : int , bind_all : bool , ** kwargs ):
6+ """Host DP-GUI server.
7+
8+ Parameters
9+ ----------
10+ port : int
11+ The port to serve DP-GUI on.
12+ bind_all : bool
13+ Serve on all public interfaces. This will expose your DP-GUI instance
14+ to the network on both IPv4 and IPv6 (where available).
15+ **kwargs
16+ additional arguments
17+
18+ Raises
19+ ------
20+ ModuleNotFoundError
21+ The dpgui package is not installed
22+ """
23+ try :
24+ from dpgui import (
25+ start_dpgui ,
26+ )
27+ except ModuleNotFoundError as e :
28+ raise ModuleNotFoundError (
29+ "To use DP-GUI, please install the dpgui package:\n pip install dpgui"
30+ ) from e
31+ start_dpgui (port = port , bind_all = bind_all )
You can’t perform that action at this time.
0 commit comments