From fdc4838ad651d9dabce3f59d0e68985980fd940b Mon Sep 17 00:00:00 2001 From: jingqinghe Date: Sat, 9 May 2020 20:33:19 +0800 Subject: [PATCH] add benchmark --- python/paddle_fl/mpc/README.md | 39 ++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/python/paddle_fl/mpc/README.md b/python/paddle_fl/mpc/README.md index 5fbd845..b6a6512 100644 --- a/python/paddle_fl/mpc/README.md +++ b/python/paddle_fl/mpc/README.md @@ -157,7 +157,15 @@ To make the MPC training run, we need to deploy the training processes on multip 1. Start a Redis service, and keep the service address: ```sh -redis-server --port ${port} +# we provide a stable redis package for you to download + +wget https://paddlefl.bj.bcebos.com/redis-stable.tar --no-check-certificate +tar -xf redis-stable.tar +cd redis-stable && make + +# start service +cd src +./redis-server --port ${port} ``` 2. Deploy the above `train.py` on three machines, and run with different role settings (from 0 to 2): @@ -176,7 +184,34 @@ Then the training process will start and the underlying MPC-based operators will ## Benchmark Task -put result here as a table? | DataSet/Task | training methods | Result | | --- | --- | --- | +#### Convergence of paddle_fl.mpc vs paddle + +- Dataset: Boston house price dataset +- Number of Epoch: 20 +- Batch Size: 10 +- Loss of Step 0 in each Epoch + +| Epoch/Step | paddle_fl.mpc | Paddle | +| Epoch=0, Step=0 | 738.39491 | 738.46204 | +| Epoch=1, Step=0 | 630.68834 | 629.9071 | +| Epoch=2, Step=0 | 539.54683 | 538.1757 | +| Epoch=3, Step=0 | 462.41159 | 460.64722 | +| Epoch=4, Step=0 | 397.11516 | 395.11017 | +| Epoch=5, Step=0 | 341.83102 | 339.69815 | +| Epoch=6, Step=0 | 295.01114 | 292.83597 | +| Epoch=7, Step=0 | 255.35141 | 253.19429 | +| Epoch=8, Step=0 | 221.74739 | 219.65132 | +| Epoch=9, Step=0 | 193.26459 | 191.25981 | +| Epoch=10, Step=0 | 169.11423 | 167.2204 | +| Epoch=11, Step=0 | 148.63138 | 146.85835 | +| Epoch=12, Step=0 | 131.25081 | 129.60391 | +| Epoch=13, Step=0 | 116.49708 | 114.97599 | +| Epoch=14, Step=0 | 103.96669 | 102.56854 | +| Epoch=15, Step=0 | 93.31706 | 92.03858 | +| Epoch=16, Step=0 | 84.26219 | 83.09653 | +| Epoch=17, Step=0 | 76.55664 | 75.49785 | +| Epoch=18, Step=0 | 69.99673 | 69.03561 | +| Epoch=19, Step=0 | 64.40562 | 63.53539 | ## On Going and Future Work -- GitLab