Skip to content

Commit 60d827a

Browse files
committed
Merge branch 'develop' of github.com:PaddlePaddle/Paddle into overlap_send_op
2 parents 20c24c0 + 8f7b020 commit 60d827a

File tree

317 files changed

+4154
-1158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+4154
-1158
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ BasedOnStyle: Google
1919
IndentWidth: 2
2020
TabWidth: 2
2121
ContinuationIndentWidth: 4
22-
AccessModifierOffset: -2 # The private/protected/public has no indent in class
22+
AccessModifierOffset: -1 # The private/protected/public has no indent in class
2323
Standard: Cpp11
2424
AllowAllParametersOfDeclarationOnNextLine: true
2525
BinPackParameters: false

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ repos:
3434
entry: bash ./tools/codestyle/cpplint_pre_commit.hook
3535
language: system
3636
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$
37+
- repo: local
38+
hooks:
39+
- id: pylint-doc-string
40+
name: pylint
41+
description: Check python docstring style using docstring_checker.
42+
entry: bash ./tools/codestyle/pylint_pre_commit.hook
43+
language: system
44+
files: \.(py)$
3745
- repo: https://github.com/PaddlePaddle/pre-commit-golang
3846
sha: 8337620115c25ff8333f1b1a493bd031049bd7c0
3947
hooks:

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ env:
1818
addons:
1919
ssh_known_hosts: 13.229.163.131
2020
before_install:
21+
# For pylint dockstring checker
22+
- sudo pip install pylint pytest astroid isort
2123
- |
2224
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
2325
script:

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ RUN pip install pre-commit 'ipython==5.3.0' && \
7979
pip install 'ipykernel==4.6.0' 'jupyter==1.0.0' && \
8080
pip install opencv-python
8181

82+
#For docstring checker
83+
RUN pip install pylint pytest astroid isort
84+
8285
COPY ./python/requirements.txt /root/
8386
RUN pip install -r /root/requirements.txt
8487

benchmark/fluid/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ Currently supported `--model` argument include:
2424

2525
* Run the following command to start a benchmark job locally:
2626
```bash
27-
python fluid_benchmark.py --model mnist --parallel 1 --device GPU --with_test
27+
python fluid_benchmark.py --model mnist --device GPU
2828
```
2929
You can choose to use GPU/CPU training. With GPU training, you can specify
30-
`--parallel 1` to run multi GPU training.
30+
`--gpus <gpu_num>` to run multi GPU training.
3131
* Run distributed training with parameter servers:
3232
* start parameter servers:
3333
```bash
34-
PADDLE_TRAINING_ROLE=PSERVER PADDLE_PSERVER_PORT=7164 PADDLE_PSERVER_IPS=127.0.0.1 PADDLE_TRAINERS=1 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --parallel 0 --device GPU --update_method pserver
34+
PADDLE_TRAINING_ROLE=PSERVER PADDLE_PSERVER_PORT=7164 PADDLE_PSERVER_IPS=127.0.0.1 PADDLE_TRAINERS=1 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --device GPU --update_method pserver
3535
```
3636
* start trainers:
3737
```bash
38-
PADDLE_TRAINING_ROLE=PSERVER PADDLE_PSERVER_PORT=7164 PADDLE_PSERVER_IPS=127.0.0.1 PADDLE_TRAINERS=1 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --parallel 0 --device GPU --update_method pserver
38+
PADDLE_TRAINING_ROLE=TRAINER PADDLE_PSERVER_PORT=7164 PADDLE_PSERVER_IPS=127.0.0.1 PADDLE_TRAINERS=1 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --device GPU --update_method pserver
3939
```
4040
* Run distributed training using NCCL2
4141
```bash
42-
PADDLE_PSERVER_PORT=7164 PADDLE_TRAINER_IPS=192.168.0.2,192.168.0.3 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --parallel 0 --device GPU --update_method nccl2
42+
PADDLE_PSERVER_PORT=7164 PADDLE_TRAINER_IPS=192.168.0.2,192.168.0.3 PADDLE_CURRENT_IP=127.0.0.1 PADDLE_TRAINER_ID=0 python fluid_benchmark.py --model mnist --device GPU --update_method nccl2
4343
```
4444

4545
## Run Distributed Benchmark on Kubernetes Cluster
@@ -48,7 +48,7 @@ We provide a script `kube_gen_job.py` to generate Kubernetes yaml files to submi
4848
distributed benchmark jobs to your cluster. To generate a job yaml, just run:
4949

5050
```bash
51-
python kube_gen_job.py --jobname myjob --pscpu 4 --cpu 8 --gpu 8 --psmemory 20 --memory 40 --pservers 4 --trainers 4 --entry "python fluid_benchmark.py --model mnist --parallel 1 --device GPU --update_method pserver --with_test" --disttype pserver
51+
python kube_gen_job.py --jobname myjob --pscpu 4 --cpu 8 --gpu 8 --psmemory 20 --memory 40 --pservers 4 --trainers 4 --entry "python fluid_benchmark.py --model mnist --parallel 1 --device GPU --update_method pserver " --disttype pserver
5252
```
5353

5454
Then the yaml files are generated under directory `myjob`, you can run:

0 commit comments

Comments
 (0)