Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hierarchical stats documentation #2882

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
chesterxgchen marked this conversation as resolved.
Show resolved Hide resolved
```
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
Loading