Skip to content

Commit

Permalink
Update flare simulator tutorial (#2899)
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanTingHsieh authored Sep 3, 2024
1 parent 5ef22f0 commit 81f23fc
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions examples/tutorials/flare_simulator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"id": "7f3a10c8",
"metadata": {},
"source": [
"The two key arguments here are `-w WORKSPACE` and the `job_folder` argument. For this example, we'll create a test workspace for the `hello-numpy-cross-val` app, and use the job from the `examples/hello-world/hello-numpy-cross-val` app folder.\n",
"The two key arguments here are `-w WORKSPACE` and the `job_folder` argument. For this example, we'll create a test workspace and use the job from the `examples/hello-world/hello-numpy-sag/jobs/hello-numpy-sag`.\n",
"\n",
"We also specify the number of clients with the `-n N_CLIENTS` argument, the number of threads `-t THREADS` over which to run the clients, and a GPU device to use. Setting `-n 2 -t 2 -gpu 0`, we will run two clients in parallel, both using GPU device 0."
]
Expand All @@ -52,8 +52,8 @@
},
"outputs": [],
"source": [
"!mkdir -p hello-numpy-cross-val-workspace\n",
"!nvflare simulator -w hello-numpy-cross-val-workspace -n 2 -t 2 -gpu 0 ../hello-world/hello-numpy-cross-val/jobs/hello-numpy-cross-val"
"!mkdir -p hello-numpy-sag-workspace\n",
"!nvflare simulator -w hello-numpy-sag-workspace -n 2 -t 2 -gpu 0 ../hello-world/hello-numpy-sag/jobs/hello-numpy-sag"
]
},
{
Expand All @@ -74,7 +74,7 @@
"id": "1d5a5758",
"metadata": {},
"source": [
"We can then check the contents of the `hello-numpy-cross-val-workspace` directory to see the job output."
"We can then check the contents of the `hello-numpy-sag-workspace` directory to see the job output."
]
},
{
Expand All @@ -84,20 +84,7 @@
"metadata": {},
"outputs": [],
"source": [
"!ls -al hello-numpy-cross-val-workspace"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "eaf97b0f",
"metadata": {},
"outputs": [],
"source": [
"import json\n",
"cross_val_file = open(\"hello-numpy-cross-val-workspace/simulate_job/cross_site_val/cross_val_results.json\")\n",
"cross_val_json = json.load(cross_val_file)\n",
"print(json.dumps(cross_val_json, indent=2))"
"!ls -al hello-numpy-sag-workspace"
]
}
],
Expand Down

0 comments on commit 81f23fc

Please sign in to comment.