Skip to content

Commit

Permalink
Update example notebooks with FEDn Studio
Browse files Browse the repository at this point in the history
 Changes to be committed:
	modified:   examples/notebooks/API_Example.ipynb
	modified:   examples/notebooks/Aggregators.ipynb

Update example notebooks with FEDn Studio endpoints and settings.
  • Loading branch information
sztoor committed Aug 27, 2024
1 parent feaaa58 commit 8f53c22
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
12 changes: 7 additions & 5 deletions examples/notebooks/API_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"source": [
"## API Example\n",
"\n",
"This notebook provides an example of how to use the FEDn API to organize experiments and to analyze validation results. We will here run one training session (a collection of global rounds) using FedAvg, then retrive and visualize the results.\n",
"This notebook provides an example of how to use the FEDn API to organize experiments and to analyze validation results. We will here run one training session (a collection of global rounds) using FedAvg, then retrive and visualize the results. For a complete list of implemented interfaces, please refer to the [FEDn APIs](https://fedn.readthedocs.io/en/latest/fedn.network.api.html#module-fedn.network.api.client).\n",
"\n",
"When you start this tutorial you should have a deployed FEDn Network up and running, and you should have created the compute package and the initial model, see the example README for instructions."
"Before starting this tutorial, make sure you have a project running in FEDn Studio and have created the compute package and the initial model. If you're not sure how to do this, please follow the instructions in sections 1, 2, and 3 of the [quickstart guide](https://fedn.readthedocs.io/en/latest/quickstart.html)."
]
},
{
Expand All @@ -33,9 +33,11 @@
"id": "1046a4e5",
"metadata": {},
"source": [
"We connect to the FEDn API service. In this example, we assume the project is hosted on the public FEDn Studio. You can find the CONTROLLER_HOST address in the project dashboard. If you're using a local sandbox, the CONTROLLER_HOST will be \"localhost,\" and the CONTROLLER_PORT will be 8092.\n",
"We connect to the FEDn API service. In this example, we assume the project is hosted on the public FEDn Studio. You can find the CONTROLLER_HOST address in the project dashboard. \n",
"\n",
"Next, you'll need to generate an access token. To do this, go to the project page in FEDn Studio, click on \"Settings,\" then \"Generate token.\" Copy the access token from the Studio and paste it into the notebook."
"NOTE: If you're using a local sandbox, the CONTROLLER_HOST will be \"localhost,\" and the CONTROLLER_PORT will be 8092.\n",
"\n",
"Next, you'll need to generate an access token. To do this, go to the project page in FEDn Studio, click on \"Settings,\" then \"Generate token.\" Copy the access token from the Studio and paste it into the notebook. In case you need further details, have a look at the [Fedn ClientAPIs](https://fedn.readthedocs.io/en/latest/apiclient.html#). "
]
},
{
Expand All @@ -55,7 +57,7 @@
"id": "07f69f5f",
"metadata": {},
"source": [
"Initialize FEDn with the compute package and seed model. Note that these files needs to be created separately by follwing instructions in the README."
"Initialize FEDn with the compute package and seed model. Note that these files needs to be created separately. If you're not sure how to do this, please follow the instructions only in sections 3 of the [quickstart guide](https://fedn.readthedocs.io/en/latest/quickstart.html#create-the-compute-package-and-seed-model)."
]
},
{
Expand Down
13 changes: 8 additions & 5 deletions examples/notebooks/Aggregators.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
"\n",
"This notebook shows how to use different Aggregators (FedAvg, FedAdam, FedYogi, FedAdaGrad). \n",
"\n",
"When you start this tutorial you should either have an account and project in FEDn Studio, or have deployed a FEDn in pseudo-distributed mode. You should also have created the compute package and the initial model, see README.md for instructions.\n",
"For a complete list of implemented interfaces, please refer to the [FEDn APIs](https://fedn.readthedocs.io/en/latest/fedn.network.api.html#module-fedn.network.api.client).\n",
"\n",
"Before starting this tutorial, make sure you have a project running in FEDn Studio and have created the compute package and the initial model. If you're not sure how to do this, please follow the instructions in sections 1, 2, and 3 of the [quickstart guide](https://fedn.readthedocs.io/en/latest/quickstart.html).\n",
" \n",
"Note that this notebook is intended to showcase the aggregator API. Fine-tuning of the server-side hyperparameters would be necessary for optimal performance and will need to be done a use-case basis."
"Note: This notebook is intended to showcase the aggregator API. Fine-tuning of the server-side hyperparameters would be necessary for optimal performance and will need to be done a use-case basis."
]
},
{
Expand All @@ -36,9 +37,11 @@
"id": "1046a4e5",
"metadata": {},
"source": [
"We connect to the FEDn API service. In this example, we assume the project is hosted on the public FEDn Studio. You can find the CONTROLLER_HOST address in the project dashboard. If you're using a local sandbox, the CONTROLLER_HOST will be \"localhost,\" and the CONTROLLER_PORT will be 8092.\n",
"In this example, we assume the project is hosted on the public FEDn Studio. You can find the CONTROLLER_HOST address in the project dashboard.\n",
"\n",
"Next, you'll need to generate an access token. To do this, go to the project page in FEDn Studio, click on \"Settings,\" then \"Generate token.\" Copy the access token from the Studio and paste it into the notebook."
"NOTE: If you're using a local sandbox, the CONTROLLER_HOST will be \"localhost,\" and the CONTROLLER_PORT will be 8092.\n",
"\n",
"Next, you'll need to generate an access token. To do this, go to the project page in FEDn Studio, click on \"Settings,\" then \"Generate token.\" Copy the access token from the Studio and paste it into the notebook. In case you need further details, have a look at the [Fedn ClientAPIs](https://fedn.readthedocs.io/en/latest/apiclient.html#)."
]
},
{
Expand All @@ -58,7 +61,7 @@
"id": "07f69f5f",
"metadata": {},
"source": [
"Initialize FEDn with the compute package and seed model. Note that these files needs to be created separately by follwing instructions in the README."
"Initialize FEDn with the compute package and seed model. Note that these files needs to be created separately. If you're not sure how to do this, please follow the instructions only in sections 3 of the [quickstart guide](https://fedn.readthedocs.io/en/latest/quickstart.html#create-the-compute-package-and-seed-model)."
]
},
{
Expand Down

0 comments on commit 8f53c22

Please sign in to comment.