Skip to content

Commit b142e68

Browse files
committed
running on multiple GPUs
1 parent 81b194e commit b142e68

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ For more details on datasets and FL algorithms in **IoT**, please refer to [FL-I
182182
cd ./dataset
183183
# Please modify train_ratio and alpha in dataset\utils\dataset_utils.py
184184

185-
# python generate_MNIST.py iid - - # for iid and unbalanced scenario
186-
# python generate_MNIST.py iid balance - # for iid and balanced scenario
187-
# python generate_MNIST.py noniid - pat # for pathological noniid and unbalanced scenario
185+
python generate_MNIST.py iid - - # for iid and unbalanced scenario
186+
python generate_MNIST.py iid balance - # for iid and balanced scenario
187+
python generate_MNIST.py noniid - pat # for pathological noniid and unbalanced scenario
188188
python generate_MNIST.py noniid - dir # for practical noniid and unbalanced scenario
189-
# python generate_MNIST.py noniid - exdir # for Extended Dirichlet strategy
189+
python generate_MNIST.py noniid - exdir # for Extended Dirichlet strategy
190190
```
191191

192192
The command line output of running `python generate_MNIST.py noniid - dir`
@@ -324,6 +324,7 @@ conda env create -f env_cuda_latest.yaml # Downgrade torch via pip if needed to
324324
```bash
325325
cd ./system
326326
python main.py -data MNIST -m CNN -algo FedAvg -gr 2000 -did 0 # using the MNIST dataset, the FedAvg algorithm, and the 4-layer CNN model
327+
python main.py -data MNIST -m CNN -algo FedAvg -gr 2000 -did 0,1,2,3 # running on multiple GPUs
327328
```
328329

329330
**Note**: It is preferable to tune algorithm-specific hyper-parameters before using any algorithm on a new machine.

docs/data.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,11 @@ <h3 id="exp-mnist">Examples for <strong>MNIST</strong> in the <em><strong>label
240240
# In ./dataset
241241
# Please modify train_ratio and alpha in dataset\utils\dataset_utils.py
242242

243-
# python generate_MNIST.py iid - - # for iid and unbalanced scenario
244-
# python generate_MNIST.py iid balance - # for iid and balanced scenario
245-
# python generate_MNIST.py noniid - pat # for pathological noniid and unbalanced scenario
243+
python generate_MNIST.py iid - - # for iid and unbalanced scenario
244+
python generate_MNIST.py iid balance - # for iid and balanced scenario
245+
python generate_MNIST.py noniid - pat # for pathological noniid and unbalanced scenario
246246
python generate_MNIST.py noniid - dir # for practical noniid and unbalanced scenario
247-
# python generate_MNIST.py noniid - exdir # for Extended Dirichlet strategy</pre>
247+
python generate_MNIST.py noniid - exdir # for Extended Dirichlet strategy</pre>
248248

249249
<p>The command line output of running <code>python generate_MNIST.py noniid - dir</code></p>
250250

docs/quickstart.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ <h2>Usage</h2>
197197
<li>Finally, run the <code>main.py</code> with choosen configurations, FL algorithm, and hyperparameters:</li>
198198
<pre>
199199
# In ./system
200-
python main.py -data MNIST -m CNN -algo FedAvg -gr 2000 -did 0 # using the MNIST dataset, the FedAvg algorithm, and the 4-layer CNN model</pre>
200+
python main.py -data MNIST -m CNN -algo FedAvg -gr 2000 -did 0 # using the MNIST dataset, the FedAvg algorithm, and the 4-layer CNN model
201+
python main.py -data MNIST -m CNN -algo FedAvg -gr 2000 -did 0,1,2,3 # running on multiple GPUs
202+
</pre>
201203
</ol>
202204
<strong>Note</strong> It is preferable to tune algorithm-specific hyper-parameters before using any algorithm on a new machine.
203205
</section>

0 commit comments

Comments
 (0)