提交 23461645 编写于 作者: R royxroy

Add design.rst

上级 5182881b
Parl Cluster Parl Cluster
============ ============
Get Started
###########
Cluster Structure Overview Cluster Structure Overview
-------------------------- ##########################
| There are three core concepts in a Parl cluster: master, worker and client. | There are three core concepts in a Parl cluster: master, worker and client.
...@@ -19,12 +16,13 @@ Cluster Structure Overview ...@@ -19,12 +16,13 @@ Cluster Structure Overview
- **Client:** For each training program, there is a unique global client which - **Client:** For each training program, there is a unique global client which
submits tasks to the master node. submits tasks to the master node.
.. image:: ./cluster_structure.png .. image:: ./parallel_training/cluster_structure.png
:width: 600px :width: 600px
:align: center :align: center
Master Master
------ ######
| There is only one master node in each parl cluster, we can start a master by | There is only one master node in each parl cluster, we can start a master by
calling ``xparl start --port 1234`` with a assigned port number. This command calling ``xparl start --port 1234`` with a assigned port number. This command
will also simultaneously start a local worker which connects to the new will also simultaneously start a local worker which connects to the new
...@@ -43,14 +41,14 @@ Master ...@@ -43,14 +41,14 @@ Master
status of the cluster (i.e. total cpu number, used cpu number, load average status of the cluster (i.e. total cpu number, used cpu number, load average
...) to the monitor. ...) to the monitor.
.. image:: ./master.png .. image:: ./parallel_training/master.png
:width: 600px :width: 600px
:align: center :align: center
Worker Worker
------ ######
| We can add more computation resources to a existed cluster by calling | We can add more computation resources to an existed cluster by calling
``xparl --connect master_address`` command. This command will create a local ``xparl --connect master_address`` command. This command will create a local
**Worker** object and then connect to the cluster. **Worker** object and then connect to the cluster.
...@@ -62,27 +60,27 @@ Worker ...@@ -62,27 +60,27 @@ Worker
job from the job buffer, start a new job and update worker information to job from the job buffer, start a new job and update worker information to
the master node. the master node.
.. image:: ./worker.png .. image:: ./parallel_training/worker.png
:width: 600px :width: 600px
:align: center :align: center
Client Client
------ ######
| We have a global client for each training program, it submits training tasks | We have a global client for each training program, it submits training tasks
to the master node. User do not need to interact with client object directly. to the master node. User do not need to interact with client object directly.
We can create a new global client or get an existed global client by calling We can create a new global client and connect it to the cluster by calling
``parl.connect(master_address)``. ``parl.connect(master_address)``.
| The global client will read local python scripts and configuration files, | The global client will read local python scripts and configuration files,
which will later be sent to remote jobs. which will later be sent to remote jobs.
.. image:: ./client.png .. image:: ./parallel_training/client.png
:width: 600px :width: 600px
:align: center :align: center
Actor Actor
----- #####
| **Actor** is an object defined by users which aims to solve a specific task. | **Actor** is an object defined by users which aims to solve a specific task.
We use ``@parl.remote_class`` decorator to convert an actor to a We use ``@parl.remote_class`` decorator to convert an actor to a
...@@ -108,6 +106,6 @@ Actor ...@@ -108,6 +106,6 @@ Actor
| When the actor call a function, the real computation will be executed in the | When the actor call a function, the real computation will be executed in the
job process by job's local actor. job process by job's local actor.
.. image:: ./actor.png .. image:: ./parallel_training/actor.png
:width: 600px :width: 600px
:align: center :align: center
...@@ -66,7 +66,6 @@ Abstractions ...@@ -66,7 +66,6 @@ Abstractions
:caption: Parallel Training :caption: Parallel Training
parallel_training/overview.rst parallel_training/overview.rst
parallel_training/cluster.rst
parallel_training/setup.rst parallel_training/setup.rst
parallel_training/recommended_practice.rst parallel_training/recommended_practice.rst
...@@ -75,6 +74,7 @@ Abstractions ...@@ -75,6 +74,7 @@ Abstractions
:caption: High-quality Implementations :caption: High-quality Implementations
implementations.rst implementations.rst
design.rst
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
......
docs/parallel_training/client.png

131.5 KB | W: | H:

docs/parallel_training/client.png

158.0 KB | W: | H:

docs/parallel_training/client.png
docs/parallel_training/client.png
docs/parallel_training/client.png
docs/parallel_training/client.png
  • 2-up
  • Swipe
  • Onion skin
docs/parallel_training/master.png

196.9 KB | W: | H:

docs/parallel_training/master.png

195.4 KB | W: | H:

docs/parallel_training/master.png
docs/parallel_training/master.png
docs/parallel_training/master.png
docs/parallel_training/master.png
  • 2-up
  • Swipe
  • Onion skin
docs/parallel_training/worker.png

236.2 KB | W: | H:

docs/parallel_training/worker.png

234.6 KB | W: | H:

docs/parallel_training/worker.png
docs/parallel_training/worker.png
docs/parallel_training/worker.png
docs/parallel_training/worker.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -32,7 +32,7 @@ class Client(object): ...@@ -32,7 +32,7 @@ class Client(object):
connect to the same global client in a training task. connect to the same global client in a training task.
Attributes: Attributes:
submit_task_socket (zmq.Context.socket): A socket which submits job to submit_task_socket (zmq.Context.socket): A socket which submits tasks to
the master node. the master node.
pyfiles (bytes): A serialized dictionary containing the code of python pyfiles (bytes): A serialized dictionary containing the code of python
files in local working directory. files in local working directory.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册