Skip to content
This repository was archived by the owner on Nov 12, 2023. It is now read-only.

Commit 51c60f1

Browse files
committed
Move the args description section
1 parent bfad4c1 commit 51c60f1

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

docs/README.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,6 @@ The main script has to be run from the **system** directory. The main script is
6767
python main.py -data fmnist -m cnn -algo FedAvg -gr 10 -did 0 -go cnn -nc 1
6868
```
6969

70-
## Using Make
71-
72-
I have added a `Makefile` to run the algorithms. The `Makefile` is located inside `this` directory. The `Makefile` has the following commands:
73-
74-
- `make run`: Run the main script with the default arguments
75-
- `make config`: Makes sure that all the needed directories are created & packages are installed and then check if the `venv` is activated or not. If not, then activate the `venv`.
76-
- `make clean`: Clean the `venv` and the `__pycache__` directories & other unwanted files/directories.
77-
78-
The `make run` command runs the main script with the following arguments:
79-
80-
```bash
81-
make run DATA=Cifar10 GR=3 NC=1 ALGO=FedAvg
82-
```
83-
84-
Here the `DATA` argument is the dataset to use, the `GR` argument is the number of global rounds to run the algorithm, the `NC` argument is the number of clients to use, and the `ALGO` argument is the algorithm to use. The `DATA` argument is required, the `GR` argument is optional and the default value is 3, the `NC` argument is optional and the default value is 1, and the `ALGO` argument is optional and the default value is FedAvg.
85-
8670
#### Arguments description
8771

8872
- `-data`: The dataset to use. Currently only `fmnist` is supported.
@@ -99,7 +83,23 @@ So to run different algorithms on the FMNIST dataset, you just have to change th
9983
python main.py -data fmnist -m cnn -algo FedProto -gr 10 -did 0 -go cnn -nc 1
10084
```
10185

102-
#### Getting the results
86+
## Using Make
87+
88+
I have added a `Makefile` to run the algorithms. The `Makefile` is located inside `this` directory. The `Makefile` has the following commands:
89+
90+
- `make run`: Run the main script with the default arguments
91+
- `make config`: Makes sure that all the needed directories are created & packages are installed and then check if the `venv` is activated or not. If not, then activate the `venv`.
92+
- `make clean`: Clean the `venv` and the `__pycache__` directories & other unwanted files/directories.
93+
94+
The `make run` command runs the main script with the following arguments:
95+
96+
```bash
97+
make run DATA=Cifar10 GR=3 NC=1 ALGO=FedAvg
98+
```
99+
100+
Here the `DATA` argument is the dataset to use, the `GR` argument is the number of global rounds to run the algorithm, the `NC` argument is the number of clients to use, and the `ALGO` argument is the algorithm to use. The `DATA` argument is required, the `GR` argument is optional and the default value is 3, the `NC` argument is optional and the default value is 1, and the `ALGO` argument is optional and the default value is FedAvg.
101+
102+
### Getting the results
103103

104104
The generated images and the execution logs are saved in separate directories. The images are saved in the `results` directory and the logs are saved in the `logs` directory.
105105

0 commit comments

Comments
 (0)