Skip to content

Commit

Permalink
Fix hierarchical stats documentation
Browse files Browse the repository at this point in the history
This patch fixes few typos in the hierarchical stats documentation and
fixes the prepare_data python script.
  • Loading branch information
apatole committed Aug 30, 2024
1 parent 9bb5879 commit 57e3771
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/advanced/federated-statistics/df_stats.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"source": [
"**Run Job using Simulator CLI**\n",
"\n",
"From a **terminal** one can also the following equivallent CLI\n",
"From a **terminal** one can also the following equivalent CLI\n",
"\n",
"```\n",
"nvflare simulator df_stats/jobs/df_stats -w /tmp/nvflare/df_stats -n 2 -t 2\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ In this example, we are using synthetic anonymous students scores datasets gener
Run the script `prepare_data.sh` that generates 7 different datasets each having random number of entries between 1000 to 2000. Each entry in the datasets has three columns - `Pass`, `Fail` and `Percentage`. `Pass`/`Fail` represents whether the particular student passed or failed the exam and `Percentage` represents the overall percentage marks scored by the student.

```shell
prepare_data.sh
./prepare_data.sh
```
it should show something like
```
Expand All @@ -53,7 +53,7 @@ With FL simulator, we can just run the example with CLI command


```
cd NVFlare/examples/advanced/hierarchical_stats
cd NVFlare/examples/advanced/federated-statistics
nvflare simulator hierarchical_stats/jobs/hierarchical_stats -w /tmp/nvflare/hierarchical_stats/ -n 7 -t 7 -c university-1,university-2,university-3,university-4,university-5,university-6,university-7
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@
"source": [
"**Run Job using Simulator CLI**\n",
"\n",
"From a **terminal** one can also the following equivallent CLI\n",
"From a **terminal** one can also the following equivalent CLI\n",
"\n",
"```\n",
"cd NVFlare/examples/advanced/hierarchical_stats\n",
"cd NVFlare/examples/advanced/federated-statistics\n",
"nvflare simulator hierarchical_stats/jobs/hierarchical_stats -w /tmp/nvflare/hierarchical_stats/ -n 7 -t 7 -c university-1,university-2,university-3,university-4,university-5,university-6,university-7\n",
"\n",
"```\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,17 @@ def prepare_data():
)

print("\nDone preparing data.")


def main():
prog_name = "data_utils"
parser, args = parse_args(prog_name)

if args.prepare_data:
prepare_data()
else:
parser.print_help()


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion examples/advanced/federated-statistics/image_stats.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"source": [
"**Run Job using Simulator CLI**\n",
"\n",
"From a **terminal** one can also the following equivallent CLI\n",
"From a **terminal** one can also the following equivalent CLI\n",
"\n",
"```\n",
"nvflare simulator image_stats/jobs/image_stats -w /tmp/nvflare/workspace/image_stats -n 4 -t 4\n",
Expand Down

0 comments on commit 57e3771

Please sign in to comment.