From 81f23fc597c2aacd7ace952254ab5e84b9c959c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yuan-Ting=20Hsieh=20=28=E8=AC=9D=E6=B2=85=E5=BB=B7=29?= Date: Tue, 3 Sep 2024 16:28:43 -0700 Subject: [PATCH] Update flare simulator tutorial (#2899) --- examples/tutorials/flare_simulator.ipynb | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/examples/tutorials/flare_simulator.ipynb b/examples/tutorials/flare_simulator.ipynb index 89aa73df0f..6c3b56f754 100644 --- a/examples/tutorials/flare_simulator.ipynb +++ b/examples/tutorials/flare_simulator.ipynb @@ -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." ] @@ -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" ] }, { @@ -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." ] }, { @@ -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" ] } ],