“6352c291e4adab6ba4b6dbc48c46d67b93d67c00”上不存在“...keras/git@gitcode.net:qq_37101384/mace.git”
未验证 提交 8aaceba5 编写于 作者: iSerendipity's avatar iSerendipity 提交者: GitHub

[xdoctest][task 238] reformat example code with google style in...

 [xdoctest][task 238] reformat example code with google style in `python/paddle/distributed/fleet/launch_utils.py` (#57060)

* [Doctest]fix No.238, test=docs_preview

* fix

* fix
上级 e9fac90e
...@@ -370,11 +370,16 @@ def get_host_name_ip(): ...@@ -370,11 +370,16 @@ def get_host_name_ip():
def add_arguments(argname, type, default, help, argparser, **kwargs): def add_arguments(argname, type, default, help, argparser, **kwargs):
"""Add argparse's argument. """Add argparse's argument.
Usage:
.. code-block:: python Examples:
parser = argparse.ArgumentParser() .. code-block:: python
add_argument("name", str, "Jonh", "User name.", parser)
args = parser.parse_args() >>> import argparse
>>> from paddle.distributed.fleet.launch_utils import add_arguments
>>> parser = argparse.ArgumentParser()
>>> add_arguments("name", str, "Jonh", "User name.", parser)
>>> args = parser.parse_args()
""" """
type = strtobool if type == bool else type type = strtobool if type == bool else type
argparser.add_argument( argparser.add_argument(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册