Skip to content

Commit

Permalink
Fixed comments punctuation
Browse files Browse the repository at this point in the history
Signed-off-by: leofracca <[email protected]>
  • Loading branch information
MDV-droid authored and leofracca committed Sep 13, 2023
1 parent 543db30 commit d660221
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"id": "857f9995",
"metadata": {},
"source": [
"First we start by installing the necessary dependencies for the workflow interface"
"First we start by installing the necessary dependencies for the workflow interface:"
]
},
{
Expand Down Expand Up @@ -218,7 +218,7 @@
"source": [
"The Watermark dataset consists of mislabelled (input, output) data pairs and is designed such that the model learns to exhibit an unusual prediction behavior on data points from this dataset. The unusual behavior can then be used to demonstrate model ownership and identify illegitimate model copies.\n",
"\n",
"Let us prepare and inspect the sample Watermark dataset. It consists of 100 images = 10 classes (1 for each digit) x 10 images (per class). Watermark images were generated by superimposing a unique pattern (per class) on a noisy background (10 images/class). (Reference - WAFFLE: Watermarking in Federated Learning https://arxiv.org/abs/2008.07298)"
"Let us prepare and inspect the sample Watermark dataset. It consists of 100 images = 10 classes (1 for each digit) x 10 images (per class). Watermark images were generated by superimposing a unique pattern (per class) on a noisy background (10 images/class). (Reference - WAFFLE: Watermarking in Federated Learning https://arxiv.org/abs/2008.07298)."
]
},
{
Expand Down Expand Up @@ -401,8 +401,8 @@
"\n",
"- `FLSpec` – Defines the flow specification. User defined flows are subclasses of this.\n",
"- `Runtime` – Defines where the flow runs, infrastructure for task transitions (how information gets sent). The `LocalRuntime` runs the flow on a single node.\n",
"- `aggregator/collaborator` - placement decorators that define where the task will be assigned\n",
"- `InspectFlow` – Utility to visualize the User-defined workflow as a Graph (only currently compatible in flows without loops)"
"- `aggregator/collaborator` - placement decorators that define where the task will be assigned.\n",
"- `InspectFlow` – Utility to visualize the User-defined workflow as a Graph (only currently compatible in flows without loops)."
]
},
{
Expand Down Expand Up @@ -441,11 +441,11 @@
"id": "c917b085",
"metadata": {},
"source": [
"Let us now define the Workflow for Watermark embedding. Here we use the same tasks as the [quickstart](https://github.com/psfoley/openfl/blob/experimental-workflow-interface/openfl-tutorials/experimental/Workflow_Interface_MNIST.ipynb), and define following additional steps for Watermarking\n",
"- PRE-TRAIN (watermark_retrain): At the start (once), initial model is trained on Watermark dataset for a specified number of epochs \n",
"- RE-TRAIN (watermark_pretrain): Every training round, Aggregated model is retrained on Watermark dataset until a desired acc threshold is reached or max number of retrain rounds are expired\n",
"Let us now define the Workflow for Watermark embedding. Here we use the same tasks as the [quickstart](https://github.com/psfoley/openfl/blob/experimental-workflow-interface/openfl-tutorials/experimental/Workflow_Interface_MNIST.ipynb), and define following additional steps for Watermarking:\n",
"- PRE-TRAIN (watermark_retrain): At the start (once), initial model is trained on Watermark dataset for a specified number of epochs.\n",
"- RE-TRAIN (watermark_pretrain): Every training round, Aggregated model is retrained on Watermark dataset until a desired acc threshold is reached or max number of retrain rounds are expired.\n",
"\n",
"Notice that both the PRE-TRAIN and RE-TRAIN tasks are defined as Aggregator processing tasks\n",
"Notice that both the PRE-TRAIN and RE-TRAIN tasks are defined as Aggregator processing tasks.\n",
"\n",
"![image.png](attachment:image.png)\\\n",
"\n",
Expand Down Expand Up @@ -711,11 +711,11 @@
"source": [
"In the `AggregatorValCollaboratorGPUWatermarking` definition above, you will notice that certain attributes of the flow were not initialized, namely the `watermark_data_loader` for Aggregator and `train_loader`, `test_loader` for the Collaborators. \n",
"\n",
"- Collaborator attributes are created in the same manner as described in [quickstart](https://github.com/psfoley/openfl/blob/experimental-workflow-interface/openfl-tutorials/experimental/Workflow_Interface_101_MNIST.ipynb)\n",
"- Collaborator attributes are created in the same manner as described in [quickstart](https://github.com/psfoley/openfl/blob/experimental-workflow-interface/openfl-tutorials/experimental/Workflow_Interface_101_MNIST.ipynb).\n",
"\n",
"- `watermark_data_loader` is created as a **private attribute** of the Aggregator and it is exposed only via the runtime. This property enables the Watermark dataset to be hidden from the collaborators as Aggregator private attributes are filtered before the state is transferred to Collaborators (in the same manner as Collaborator private attributes are hidden from Aggregator)\n",
"- `watermark_data_loader` is created as a **private attribute** of the Aggregator and it is exposed only via the runtime. This property enables the Watermark dataset to be hidden from the collaborators as Aggregator private attributes are filtered before the state is transferred to Collaborators (in the same manner as Collaborator private attributes are hidden from Aggregator).\n",
"\n",
"Lets define these attributes along with some other parameters (seed, batch-sizes, optimizer parameters) and create the LocalRuntime"
"Lets define these attributes along with some other parameters (seed, batch-sizes, optimizer parameters) and create the LocalRuntime:"
]
},
{
Expand Down Expand Up @@ -868,7 +868,7 @@
"id": "bf66c1cd",
"metadata": {},
"source": [
"Finally we visualize the User-workflow as a Flowgraph as an html file. This requires checkpointing to be enabled and `InspectFlow` generates the Flowgraph for the Federated Flowobject and associated run-id"
"Finally we visualize the User-workflow as a Flowgraph as an html file. This requires checkpointing to be enabled and `InspectFlow` generates the Flowgraph for the Federated Flowobject and associated run-id."
]
},
{
Expand Down

0 comments on commit d660221

Please sign in to comment.