提交 e7b7be82 编写于 作者: D dongdaxiang

add fleet doc

上级 c1d4ce35
...@@ -11,9 +11,9 @@ paddle.distributed ...@@ -11,9 +11,9 @@ paddle.distributed
distributed/ParallelEnv.rst distributed/ParallelEnv.rst
distributed/prepare_context.rst distributed/prepare_context.rst
distributed/spawn.rst distributed/spawn.rst
distributed/fleet/DistributedStrategy.rst distributed/all_gather.rst
distributed/fleet/PaddleCloudRoleMaker.rst distributed/all_reduce.rst
distributed/fleet/DatasetFactory.rst distributed/barrier.rst
distributed/fleet/UserDefinedRoleMaker.rst distributed/broadcast.rst
distributed/fleet/UtilBase.rst distributed/reduce.rst
distributed/scatter.rst
.. _api_distributed_ParallelEnv: .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_paddle_ParallelEnv:
ParallelEnv ParallelEnv
------------------------------- -----------
:doc_source: paddle.fluid.dygraph.parallel.ParallelEnv
\ No newline at end of file .. autoclass:: paddle.distributed.paddle.ParallelEnv
:members:
:inherited-members:
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_paddle_all_gather:
all_gather
----------
.. autofunction:: paddle.distributed.paddle.all_gather
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_paddle_all_reduce:
all_reduce
----------
.. autofunction:: paddle.distributed.paddle.all_reduce
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_paddle_barrier:
barrier
-------
.. autofunction:: paddle.distributed.paddle.barrier
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_paddle_broadcast:
broadcast
---------
.. autofunction:: paddle.distributed.paddle.broadcast
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY! !DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_get_rank: .. _api_distributed_paddle_get_rank:
get_rank get_rank
-------- --------
.. autofunction:: paddle.distributed.get_rank .. autofunction:: paddle.distributed.paddle.get_rank
:noindex: :noindex:
\ No newline at end of file
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY! !DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_get_world_size: .. _api_distributed_paddle_get_world_size:
get_world_size get_world_size
-------------- --------------
.. autofunction:: paddle.distributed.get_world_size .. autofunction:: paddle.distributed.paddle.get_world_size
:noindex: :noindex:
\ No newline at end of file
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY! !DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_init_parallel_env: .. _api_distributed_paddle_init_parallel_env:
init_parallel_env init_parallel_env
----------------- -----------------
.. autofunction:: paddle.distributed.init_parallel_env .. autofunction:: paddle.distributed.paddle.init_parallel_env
:noindex: :noindex:
\ No newline at end of file
.. _api_distributed_prepare_context: .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_paddle_prepare_context:
prepare_context prepare_context
------------------------------- ---------------
:doc_source: paddle.fluid.dygraph.parallel.prepare_context
.. autofunction:: paddle.distributed.paddle.prepare_context
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_paddle_reduce:
reduce
------
.. autofunction:: paddle.distributed.paddle.reduce
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_paddle_scatter:
scatter
-------
.. autofunction:: paddle.distributed.paddle.scatter
:noindex:
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY! !DO NOT EDIT THIS FILE MANUALLY!
.. _api_distributed_spawn: .. _api_distributed_paddle_spawn:
spawn spawn
----- -----
.. autofunction:: paddle.distributed.spawn .. autofunction:: paddle.distributed.paddle.spawn
:noindex: :noindex:
\ No newline at end of file
==================
paddle.distributed.fleet
==================
.. toctree::
:maxdepth: 1
fleet/Fleet.rst
fleet/DistributedStrategy.rst
fleet/PaddleCloudRoleMaker.rst
fleet/DatasetFactory.rst
fleet/UserDefinedRoleMaker.rst
fleet/UtilBase.rst
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fleet_paddle_distributed_Fleet:
Fleet
-----
.. autoclass:: paddle.fleet.paddle.distributed.Fleet
:members:
:inherited-members:
:noindex:
...@@ -18,11 +18,14 @@ import sys ...@@ -18,11 +18,14 @@ import sys
import types import types
import os import os
import contextlib import contextlib
import paddle as paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.tensor as tensor import paddle.tensor as tensor
import paddle.nn as nn import paddle.nn as nn
import paddle.optimizer as optimizer import paddle.optimizer as optimizer
import paddle.distributed.fleet as fleet
import paddle.distributed as distributed
#import paddle.complex as complex #import paddle.complex as complex
#import paddle.framework as framework #import paddle.framework as framework
...@@ -174,16 +177,25 @@ def generate_doc(module_name, module_prefix, output, output_name, ...@@ -174,16 +177,25 @@ def generate_doc(module_name, module_prefix, output, output_name,
if module_prefix == "": if module_prefix == "":
module_prefix = None module_prefix = None
print("module_name: {}".format(module_name))
print("module_prefix: {}".format(module_prefix))
print("output: {}".format(output))
print("output_name: {}".format(output_name))
print("output_dir: {}".format(output_dir))
gen = DocGenerator() gen = DocGenerator()
if module_name is None: if module_name is None:
gen.module = eval(output_name) gen.module = eval(output_name)
gen.module_name = str(output_name) gen.module_name = str(output_name)
else: else:
print("output name: {}".format(output_name))
gen.module = eval(output_name) gen.module = eval(output_name)
for each_module_name in module_name.split('.'): for each_module_name in module_name.split('.'):
print("forloop module name: {}".format(each_module_name))
print("module")
print(gen.module)
if not hasattr(gen.module, each_module_name): if not hasattr(gen.module, each_module_name):
raise ValueError("Cannot find fluid.{0}".format(module_name)) raise ValueError("Cannot find paddle.{0}".format(module_name))
else: else:
gen.module = getattr(gen.module, each_module_name) gen.module = getattr(gen.module, each_module_name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册