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 sbs notebooks #2887

Merged
merged 2 commits 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
6 changes: 2 additions & 4 deletions examples/hello-world/step-by-step/cifar10/cse/cse.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,9 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "67c617df",
"cell_type": "markdown",
"id": "2f73c909",
"metadata": {},
"outputs": [],
"source": [
"Let's use the Job API to create a job and run using the simulator:"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,34 @@
"First add the `CyclicServerConfig` for the `CyclicServerController` with our desired parameters.\n",
"Here we set the required number of rounds, and also increase the max status report interval to 300 seconds.\n",
"\n",
"Next we add the `CyclicClientConfig` for the `CyclicClientController` that handles all `cyclic_*` tasks and maps the `learn_task_name` to the `train` task handled by the `ScriptRunner` with our `train.py` script. The `PTFileModelPersistor` with the initial `Net()` model and the `FullModelShareableGenerator` are also added as components in the `CyclicClientConfig`.\n",
"\n",
"Below is the Job API script:"
"Next we add the `CyclicClientConfig` for the `CyclicClientController` that handles all `cyclic_*` tasks and maps the `learn_task_name` to the `train` task handled by the `ScriptRunner` with our `train.py` script. The `PTFileModelPersistor` with the initial `Net()` model and the `FullModelShareableGenerator` are also added as components in the `CyclicClientConfig`."
]
},
{
"cell_type": "markdown",
"id": "bd739da0",
"metadata": {},
"source": [
"Let's first copy the required files:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1790c96c",
"metadata": {},
"outputs": [],
"source": [
"! cp ../code/fl/train.py train.py\n",
"! cp ../code/fl/net.py net.py"
]
},
{
"cell_type": "markdown",
"id": "c3def3f4",
"metadata": {},
"source": [
"Then we can use Job API to easily create a job and run in simulator:"
]
},
{
Expand All @@ -73,11 +98,6 @@
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"\n",
"code_path = \"../code/fl\"\n",
"if code_path not in sys.path:\n",
" sys.path.append(code_path)\n",
"\n",
"from net import Net\n",
"\n",
Expand All @@ -88,7 +108,7 @@
"\n",
"n_clients = 2\n",
"num_rounds = 3\n",
"train_script = \"../code/fl/train.py\"\n",
"train_script = \"train.py\"\n",
"\n",
"job = CCWFJob(name=\"cifar10_cyclic\")\n",
"\n",
Expand Down
Loading