From 500973535933a9866af35af5e88ccf01e7180d4f Mon Sep 17 00:00:00 2001 From: Marcello De Vincenzi <80536254+MDV-droid@users.noreply.github.com> Date: Wed, 12 Jul 2023 15:14:46 +0200 Subject: [PATCH] Fixed comments punctuation --- ...gregator_Validation_Ray_Watermarking.ipynb | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/openfl-tutorials/experimental/Workflow_Interface_401_MNIST_Aggregator_Validation_Ray_Watermarking.ipynb b/openfl-tutorials/experimental/Workflow_Interface_401_MNIST_Aggregator_Validation_Ray_Watermarking.ipynb index 12dcebf660d..f8f782576f5 100644 --- a/openfl-tutorials/experimental/Workflow_Interface_401_MNIST_Aggregator_Validation_Ray_Watermarking.ipynb +++ b/openfl-tutorials/experimental/Workflow_Interface_401_MNIST_Aggregator_Validation_Ray_Watermarking.ipynb @@ -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:" ] }, { @@ -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)." ] }, { @@ -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)." ] }, { @@ -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", @@ -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:" ] }, { @@ -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." ] }, {