Skip to content

Commit 0fde2b1

Browse files
authored
Reformat docs/tutorial/elasticdl_local.md (#2056)
1 parent 2a86b0b commit 0fde2b1

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

docs/tutorials/elasticdl_local.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
# ElasticDL on Local Environment
22

3-
This document aims to give a simple example to show how to submit deep learning jobs to a local kubernetes cluster in a local computer. It helps to understand the working process of ElasticDL.
3+
This document aims to give a simple example to show how to submit deep learning
4+
jobs to a local kubernetes cluster in a local computer. It helps to understand
5+
the working process of ElasticDL.
46

57
## Environment preparation
68

7-
Here we should install Minikube first. Please refer to the official [installation guide](https://kubernetes.io/docs/tasks/tools/install-minikube/).
9+
Here we should install Minikube first. Please refer to the official
10+
[installation guide](https://kubernetes.io/docs/tasks/tools/install-minikube/).
811

9-
In this tutorial, we use [hyperkit](https://github.com/moby/hyperkit) as the hypervisor of Minikube.
12+
In this tutorial, we use [hyperkit](https://github.com/moby/hyperkit) as the
13+
hypervisor of Minikube.
1014

1115
## Write model file
1216

13-
We use TensorFlow Keras API to build our models. Please refer to this [tutorials](model_building.md) on model building for details.
14-
15-
In this tutorial, we use a [model](https://github.com/sql-machine-learning/elasticdl/blob/develop/model_zoo/mnist_functional_api/mnist_functional_api.py) predefined in model zoo directory.
17+
We use TensorFlow Keras API to build our models. Please refer to this
18+
[tutorials](model_building.md) on model building for details. In this tutorial,
19+
we use a model predefined in model zoo directory.
1620

1721
## Summit Job to Minikube
1822

@@ -81,15 +85,25 @@ elasticdl train \
8185
--distribution_strategy=ParameterServerStrategy
8286
```
8387

84-
`image_base` is the base docker image argument. A new image will be built based on it each time while submitting the Elastic job.
88+
`image_base` is the base docker image argument. A new image will be built based
89+
on it each time while submitting the Elastic job.
8590

86-
We use the model predefined in model zoo directory. The model definition will be packed into the new docker image. The training and validation data are packaged to the base docker image already. We could use them directly.
91+
We use the model predefined in model zoo directory. The model definition will be
92+
packed into the new docker image. The training and validation data are packaged
93+
to the base docker image already. We could use them directly.
8794

88-
In this example, we use parameter server strategy. We launch a master pod, a parameter server(PS) pod and a worker pod. The worker pod gets model parameters from the PS pod, computes gradients and sends computed gradients to the PS pod. The PS pod iteratively updates these model parameters using gradients sent by the worker pod. For more details about parameter server strategy, please refer to the [design doc](https://github.com/sql-machine-learning/elasticdl/blob/develop/docs/designs/parameter_server.md).
95+
In this example, we use parameter server strategy. We launch a master pod, a
96+
parameter server(PS) pod and a worker pod. The worker pod gets model parameters
97+
from the PS pod, computes gradients and sends computed gradients to the PS
98+
pod. The PS pod iteratively updates these model parameters using gradients sent
99+
by the worker pod. For more details about parameter server strategy, please
100+
refer to the [design
101+
doc](https://github.com/sql-machine-learning/elasticdl/blob/develop/docs/designs/parameter_server.md).
89102

90103
### Check job status
91104

92-
After submitting the job to Minikube, we can run the following command to check the status of each pod:
105+
After submitting the job to Minikube, we can run the following command to check
106+
the status of each pod:
93107

94108
```bash
95109
kubectl get pods

0 commit comments

Comments
 (0)