Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chesterxgchen committed Feb 24, 2025
1 parent 6716ec1 commit d013dc9
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
"\n",
"We use the `FedAvg` algorithm and workflow.\n",
"\n",
"```markdown\n",
"\n",
"## Run Federated Learning Training\n",
"\n",
"The training code consists of three main scripts: `fl_job.py` for the overall job flow, `client.py` for the client-side training, and `network.py` for the network model. We use the built-in `FedAvg` algorithm for the server-side workflow.\n",
"```\n",
"\n",
"\n",
"To run the training in the simulator, we can simply execute `fl_job.py`.\n"
]
Expand Down Expand Up @@ -104,7 +104,7 @@
"kernelspec": {
"display_name": "nvflare_env",
"language": "python",
"name": "python3"
"name": "nvflare_env"
},
"language_info": {
"codemirror_mode": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"\n",
"The CIFAR10 data will be downloaded to the common location. To make this process easiler, we wrote an simple download program like the followings\n",
"\n",
"```\n",
"```python\n",
"\n",
"import argparse\n",
"import torchvision.datasets as datasets\n",
Expand Down Expand Up @@ -105,10 +105,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "87a13909",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Downloading https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz to /tmp/nvflare/data/cifar10/cifar-10-python.tar.gz\n",
"100%|████████████████████████████████████████| 170M/170M [00:05<00:00, 28.6MB/s]\n",
"Extracting /tmp/nvflare/data/cifar10/cifar-10-python.tar.gz to /tmp/nvflare/data/cifar10\n",
"Files already downloaded and verified\n"
]
}
],
"source": [
"!python3 code/data/download.py"
]
Expand All @@ -123,10 +134,28 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "08bbe572",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[01;34m/tmp/nvflare/data/cifar10/cifar-10-batches-py/\u001b[0m\n",
"├── \u001b[00mbatches.meta\u001b[0m\n",
"├── \u001b[00mdata_batch_1\u001b[0m\n",
"├── \u001b[00mdata_batch_2\u001b[0m\n",
"├── \u001b[00mdata_batch_3\u001b[0m\n",
"├── \u001b[00mdata_batch_4\u001b[0m\n",
"├── \u001b[00mdata_batch_5\u001b[0m\n",
"├── \u001b[00mreadme.html\u001b[0m\n",
"└── \u001b[00mtest_batch\u001b[0m\n",
"\n",
"0 directories, 8 files\n"
]
}
],
"source": [
"!tree /tmp/nvflare/data/cifar10/cifar-10-batches-py/"
]
Expand Down Expand Up @@ -170,9 +199,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "nvflare_env",
"language": "python",
"name": "python3"
"name": "nvflare_env"
},
"language_info": {
"codemirror_mode": {
Expand Down

0 comments on commit d013dc9

Please sign in to comment.