From 61cf48562b40d34641919f3f2a8a99536d89474e Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Wed, 24 Jul 2024 11:29:05 +0200 Subject: [PATCH 1/7] Update headings, raname, update index --- datasets/doc/source/index.rst | 2 + datasets/doc/source/tutorial-quickstart.ipynb | 47 +++++++------------ ....ipynb => tutorial-use-partitioners.ipynb} | 41 ++++++++-------- ...torial-visualize-label-distribution.ipynb} | 29 +++++------- 4 files changed, 53 insertions(+), 66 deletions(-) rename datasets/doc/source/{how-to-use-partitioners.ipynb => tutorial-use-partitioners.ipynb} (95%) rename datasets/doc/source/{how-to-visualize-label-distribution.ipynb => tutorial-visualize-label-distribution.ipynb} (99%) diff --git a/datasets/doc/source/index.rst b/datasets/doc/source/index.rst index fcc7920711bf..b17067d8022d 100644 --- a/datasets/doc/source/index.rst +++ b/datasets/doc/source/index.rst @@ -26,6 +26,8 @@ A learning-oriented series of tutorials is the best place to start. :caption: Tutorial tutorial-quickstart + tutorial-use-partitioner + tutorial-visualize-label-distribution How-to guides ~~~~~~~~~~~~~ diff --git a/datasets/doc/source/tutorial-quickstart.ipynb b/datasets/doc/source/tutorial-quickstart.ipynb index d8bc49102a7a..7540641f7a8b 100644 --- a/datasets/doc/source/tutorial-quickstart.ipynb +++ b/datasets/doc/source/tutorial-quickstart.ipynb @@ -15,7 +15,7 @@ "id": "e0f34a29f74b13cb", "metadata": {}, "source": [ - "# Install Flower Datasets" + "## Install Flower Datasets" ] }, { @@ -45,7 +45,7 @@ "id": "499dd2f0d23d871e", "metadata": {}, "source": [ - "# Choose the dataset\n", + "## Choose the dataset\n", "\n", "To choose the dataset, go to Hugging Face [Datasets Hub](https://huggingface.co/datasets) and search for your dataset by name. You will pass that names to the `dataset` parameter of `FederatedDataset`. Note that the name is case-sensitive.\n", "\n", @@ -79,7 +79,7 @@ "id": "e0c146753048fb2a", "metadata": {}, "source": [ - "# Partition the dataset\n", + "## Partition the dataset\n", "\n", "To partition a dataset (in a basic scenario), you need to choose two things:\n", "1) A dataset (identified by a name),\n", @@ -131,7 +131,7 @@ "id": "efa7dbb120505f1f", "metadata": {}, "source": [ - "# Investigate the partition" + "## Investigate the partition" ] }, { @@ -139,7 +139,7 @@ "id": "bf986a1a9f0284cd", "metadata": {}, "source": [ - "## Features\n", + "### Features\n", "\n", "Now we will determine the names of the features of your dataset (you can alternatively do that directly on the Hugging Face\n", "website). The names can vary along different datasets e.g. \"img\" or \"image\", \"label\" or \"labels\". Additionally, if the label column is of [ClassLabel](https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.ClassLabel) type, we will also see the names of labels." @@ -173,7 +173,7 @@ "id": "2e69ed05193a098a", "metadata": {}, "source": [ - "## Indexing\n", + "### Indexing\n", "\n", "To see the first sample of the partition, we can index it like a Python list." ] @@ -388,7 +388,7 @@ "id": "b5e683cfaddf92f", "metadata": {}, "source": [ - "# Use with PyTorch/NumPy/TensorFlow\n", + "## Use with PyTorch/NumPy/TensorFlow\n", "\n", "For more detailed instructions, go to:\n", "* [how-to-use-with-pytorch](https://flower.ai/docs/datasets/how-to-use-with-pytorch.html)\n", @@ -401,7 +401,7 @@ "id": "de14f09f0ee4f6ac", "metadata": {}, "source": [ - "## PyTorch\n", + "### PyTorch\n", "\n", "Transform the `Dataset` into the `DataLoader`, use the `PyTorch transforms` (`Compose` and all the others are possible)." ] @@ -444,7 +444,7 @@ "id": "71531613", "metadata": {}, "source": [ - "## NumPy\n", + "### NumPy\n", "\n", "NumPy can be used as input to the TensorFlow and scikit-learn models. The transformation is very simple." ] @@ -465,7 +465,7 @@ "id": "e4867834", "metadata": {}, "source": [ - "## TensorFlow Dataset\n", + "### TensorFlow Dataset\n", "\n", "Transformation to TensorFlow Dataset is a one-liner." ] @@ -497,32 +497,21 @@ "id": "61fd797c", "metadata": {}, "source": [ - "# Final remarks" - ] - }, - { - "cell_type": "markdown", - "id": "91ad1252", - "metadata": {}, - "source": [ + "## Final remarks\n", + "\n", "Congratulations, you now know the basics of Flower Datasets and are ready to perform basic dataset preparation for Federated Learning." ] }, { "cell_type": "markdown", - "id": "ade71d23", - "metadata": {}, - "source": [ - "# Next Steps" - ] - }, - { - "cell_type": "markdown", - "id": "f54d8031", + "id": "cbdfe1b5", "metadata": {}, "source": [ + "## Next \n", + "\n", "This is the first quickstart tutorial from the Flower Datasets series. See other tutorials:\n", - "* [Visualize Label Distribution](https://flower.ai/docs/datasets/how-to-visualize-label-distribution.html)" + "* [Use `Partitioner`s](https://flower.ai/docs/datasets/tutorial-use-partitioners.html)\n", + "* [Visualize Label Distribution](https://flower.ai/docs/datasets/tutorial-visualize-label-distribution.html)" ] } ], @@ -542,7 +531,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.10.9" } }, "nbformat": 4, diff --git a/datasets/doc/source/how-to-use-partitioners.ipynb b/datasets/doc/source/tutorial-use-partitioners.ipynb similarity index 95% rename from datasets/doc/source/how-to-use-partitioners.ipynb rename to datasets/doc/source/tutorial-use-partitioners.ipynb index 4621fdee15ea..b0feceffda8f 100644 --- a/datasets/doc/source/how-to-use-partitioners.ipynb +++ b/datasets/doc/source/tutorial-use-partitioners.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# How to use `Partitioner`s\n", + "# Use `Partitioner`s\n", "\n", "The aim of this tutorial is to make you familiar with the available `Partitioner`s that `Flower Datasets` have out-of-the-box." ] @@ -13,7 +13,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Install" + "## Install" ] }, { @@ -29,17 +29,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# What is `Partitioner`?\n", + "## What is `Partitioner`?\n", "\n", - "`Partitioner` is an object responsible for dividing a dataset according to a chosen strategy. There are many `Partitioner`s that you can use (see the full list [here](https://flower.ai/docs/datasets/ref-api/flwr_datasets.partitioner.html)) and all of them inherit from the `Partitioner` object which is an abstract class providing basic structure and methods that need to be implemented for any new `Partitioner` to integrate with the rest of `Flower Datasets` code. The creation of different `Partitioner` differs, but the behavior is the same = they produce the same type of objects.\n", - "\n" + "`Partitioner` is an object responsible for dividing a dataset according to a chosen strategy. There are many `Partitioner`s that you can use (see the full list [here](https://flower.ai/docs/datasets/ref-api/flwr_datasets.partitioner.html)) and all of them inherit from the `Partitioner` object which is an abstract class providing basic structure and methods that need to be implemented for any new `Partitioner` to integrate with the rest of `Flower Datasets` code. The creation of different `Partitioner` differs, but the behavior is the same = they produce the same type of objects." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## `IidPartitioner` Creation\n", + "### `IidPartitioner` Creation\n", "\n", "Let's create (instantiate) the most basic partitioner, [`IidPartitioner`](https://flower.ai/docs/datasets/ref-api/flwr_datasets.partitioner.IidPartitioner.html#flwr_datasets.partitioner.IidPartitioner) and learn how it interacts with `FederatedDataset`." ] @@ -73,7 +72,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## How do you specify the split to partition?\n", + "### How do you specify the split to partition?\n", "\n", "The specification of the split happens as you specify the `partitioners` argument for `FederatedDataset`. It maps `partition_id: str` to the partitioner that will be used for that split of the data. In the example below we're using the `train` split of the `cifar10` dataset to partition.\n", "\n", @@ -138,7 +137,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Use Different `Partitioners`" + "### Use Different `Partitioners`" ] }, { @@ -164,7 +163,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Creating non-IID partitions: Use ``PathologicalPartitioner``\n", + "#### Creating non-IID partitions: Use ``PathologicalPartitioner``\n", "\n", "Now, we are going to create partitions that have only a subset of labels in each partition by using [`PathologicalPartitioner`](https://flower.ai/docs/datasets/ref-api/flwr_datasets.partitioner.PathologicalPartitioner.html#flwr_datasets.partitioner.PathologicalPartitioner). In this scenario we have the exact control about the number of unique labels on each partition. The smaller the number is the more heterogenous the division gets. Let's have a look at how it works with `num_classes_per_partition=2`." ] @@ -260,7 +259,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Creating non-IID partitions: Use ``DirichletPartitioner``\n", + "#### Creating non-IID partitions: Use ``DirichletPartitioner``\n", "\n", "With the [`DirichletParitioner`](https://flower.ai/docs/datasets/ref-api/flwr_datasets.partitioner.DirichletPartitioner.html#flwr_datasets.partitioner.DirichletPartitioner), the primary tool for controlling heterogeneity is the `alpha` parameter; the smaller the value gets, the more heterogeneous the federated datasets are. Instead of choosing the exact number of classes on each partition, here we sample the probability distribution from the Dirichlet distribution, which tells how the samples associated with each class will be divided." ] @@ -331,22 +330,22 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Final remarks\n", - "Congratulations, you now know how to use different `Partitioner`s with `FederatedDataset` in Flower Datasets.\n", - "\n", - "# Next Steps\n", - "This is the second quickstart tutorial from the Flower Datasets series. See next tutorials:\n", - "\n", - "* [Visualize Label Distribution](https://flower.ai/docs/datasets/how-to-visualize-label-distribution.html)\n", - "\n", - "Previous tutorials:\n", - "* [Quickstart Basics](https://flower.ai/docs/datasets/quickstart-tutorial.html)" + "## Final remarks\n", + "Congratulations, you now know how to use different `Partitioner`s with `FederatedDataset` in Flower Datasets." ] }, { "cell_type": "markdown", "metadata": {}, - "source": [] + "source": [ + "## Next Steps\n", + "This is the second quickstart tutorial from the Flower Datasets series. See next tutorials:\n", + "\n", + "* [Visualize Label Distribution](https://flower.ai/docs/datasets/tutorial-visualize-label-distribution.html)\n", + "\n", + "Previous tutorials:\n", + "* [Quickstart Basics](https://flower.ai/docs/datasets/tutorial-quickstart.html)" + ] } ], "metadata": { diff --git a/datasets/doc/source/how-to-visualize-label-distribution.ipynb b/datasets/doc/source/tutorial-visualize-label-distribution.ipynb similarity index 99% rename from datasets/doc/source/how-to-visualize-label-distribution.ipynb rename to datasets/doc/source/tutorial-visualize-label-distribution.ipynb index 26db72047cff..f2889973a867 100644 --- a/datasets/doc/source/how-to-visualize-label-distribution.ipynb +++ b/datasets/doc/source/tutorial-visualize-label-distribution.ipynb @@ -26,15 +26,7 @@ "id": "7220467f2c6ba432", "metadata": {}, "source": [ - "## Common Setup" - ] - }, - { - "cell_type": "markdown", - "id": "4e2ad2f0a0f7174d", - "metadata": {}, - "source": [ - "Install Flower Datasets library:" + "## Install Flower Datasets" ] }, { @@ -1100,14 +1092,15 @@ "* if you want to do any custom modification of the returned plots\n", " * [matplotlib](https://matplotlib.org/)\n", " * [seaborn](https://seaborn.pydata.org/)\n", - " * or plot directly using pandas object [pd.DataFrame.plot](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html)" + " * or plot directly using pandas object [pd.DataFrame.plot](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html)\n", + "\n", + "\n", + "This was the tutorial from the series. \n", + "\n", + "Previous tutorials:\n", + "* [Quickstart Basics](https://flower.ai/docs/datasets/tutorial-quickstart.html)\n", + "* [Use `Partitioner`s](https://flower.ai/docs/datasets/tutorial-use-partitioners.html)" ] - }, - { - "cell_type": "markdown", - "id": "52655972", - "metadata": {}, - "source": [] } ], "metadata": { @@ -1115,6 +1108,10 @@ "display_name": "flwr", "language": "python", "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.10.9" } }, "nbformat": 4, From 4c3b501062c420bdeabc7fca2491537360d98678 Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Wed, 24 Jul 2024 11:30:04 +0200 Subject: [PATCH 2/7] Fix formatting --- datasets/doc/source/tutorial-quickstart.ipynb | 16 +------ .../source/tutorial-use-partitioners.ipynb | 46 ++++++++----------- ...utorial-visualize-label-distribution.ipynb | 4 -- 3 files changed, 20 insertions(+), 46 deletions(-) diff --git a/datasets/doc/source/tutorial-quickstart.ipynb b/datasets/doc/source/tutorial-quickstart.ipynb index 7540641f7a8b..17ab964206b5 100644 --- a/datasets/doc/source/tutorial-quickstart.ipynb +++ b/datasets/doc/source/tutorial-quickstart.ipynb @@ -99,7 +99,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "a759c5b6f25c9dd4", "metadata": {}, "outputs": [], @@ -164,7 +164,7 @@ } ], "source": [ - "# Note this dataset has \n", + "# Note this dataset has\n", "partition.features" ] }, @@ -520,18 +520,6 @@ "display_name": "flwr", "language": "python", "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" } }, "nbformat": 4, diff --git a/datasets/doc/source/tutorial-use-partitioners.ipynb b/datasets/doc/source/tutorial-use-partitioners.ipynb index b0feceffda8f..4a303b4ec4df 100644 --- a/datasets/doc/source/tutorial-use-partitioners.ipynb +++ b/datasets/doc/source/tutorial-use-partitioners.ipynb @@ -45,7 +45,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -81,7 +81,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -93,7 +93,7 @@ "})" ] }, - "execution_count": 4, + "execution_count": null, "metadata": {}, "output_type": "execute_result" } @@ -111,7 +111,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -123,7 +123,7 @@ " 'label': [1, 2, 6]}" ] }, - "execution_count": 5, + "execution_count": null, "metadata": {}, "output_type": "execute_result" } @@ -170,7 +170,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -182,7 +182,7 @@ "})" ] }, - "execution_count": 6, + "execution_count": null, "metadata": {}, "output_type": "execute_result" } @@ -208,7 +208,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -220,7 +220,7 @@ " 'label': [0, 0, 7]}" ] }, - "execution_count": 7, + "execution_count": null, "metadata": {}, "output_type": "execute_result" } @@ -232,7 +232,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -241,7 +241,7 @@ "array([0, 7])" ] }, - "execution_count": 8, + "execution_count": null, "metadata": {}, "output_type": "execute_result" } @@ -266,7 +266,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -278,7 +278,7 @@ "})" ] }, - "execution_count": 10, + "execution_count": null, "metadata": {}, "output_type": "execute_result" } @@ -288,7 +288,9 @@ "\n", "# Set the partitioner to create 10 partitions with alpha 0.1 (so fairly non-IID)\n", "# Partition using column \"label\" (a column in the huggingface representation of CIFAR-10)\n", - "dirichlet_partitioner = DirichletPartitioner(num_partitions=10, alpha=0.1, partition_by=\"label\")\n", + "dirichlet_partitioner = DirichletPartitioner(\n", + " num_partitions=10, alpha=0.1, partition_by=\"label\"\n", + ")\n", "\n", "# Create the federated dataset passing the partitioner\n", "fds = FederatedDataset(\n", @@ -302,7 +304,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -316,7 +318,7 @@ " 'label': [4, 4, 0, 1, 4]}" ] }, - "execution_count": 13, + "execution_count": null, "metadata": {}, "output_type": "execute_result" } @@ -353,18 +355,6 @@ "display_name": "flwr", "language": "python", "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" } }, "nbformat": 4, diff --git a/datasets/doc/source/tutorial-visualize-label-distribution.ipynb b/datasets/doc/source/tutorial-visualize-label-distribution.ipynb index f2889973a867..81607844cd1e 100644 --- a/datasets/doc/source/tutorial-visualize-label-distribution.ipynb +++ b/datasets/doc/source/tutorial-visualize-label-distribution.ipynb @@ -1108,10 +1108,6 @@ "display_name": "flwr", "language": "python", "name": "python3" - }, - "language_info": { - "name": "python", - "version": "3.10.9" } }, "nbformat": 4, From 6558184c0f53d8a7602b21b3c43fd4eeafc82e80 Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Wed, 24 Jul 2024 11:30:48 +0200 Subject: [PATCH 3/7] Remove old reference from index --- datasets/doc/source/index.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/datasets/doc/source/index.rst b/datasets/doc/source/index.rst index b17067d8022d..15f173848467 100644 --- a/datasets/doc/source/index.rst +++ b/datasets/doc/source/index.rst @@ -43,7 +43,6 @@ Problem-oriented how-to guides show step-by-step how to achieve a specific goal. how-to-use-with-tensorflow how-to-use-with-numpy how-to-use-with-local-data - how-to-visualize-label-distribution how-to-disable-enable-progress-bar References From 4f80fad452c0473459a0d88bdf74f88958d93ad8 Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Wed, 24 Jul 2024 16:31:00 +0200 Subject: [PATCH 4/7] Add redirect for the visualization guide --- datasets/doc/source/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datasets/doc/source/conf.py b/datasets/doc/source/conf.py index 66a506d68ecc..4290b46a2948 100644 --- a/datasets/doc/source/conf.py +++ b/datasets/doc/source/conf.py @@ -110,9 +110,9 @@ def find_test_modules(package_path): # Sphinx redirects, implemented after the doc filename changes. # To prevent 404 errors and redirect to the new pages. -# redirects = { -# } - +redirects = { + "how-to-visualize-label-distribution.html": "tutorial-visualize-label-distribution.html", +} # -- Options for HTML output ------------------------------------------------- From cb81f64f276e9b460e41544f3425e4c1c102054e Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Wed, 24 Jul 2024 16:36:32 +0200 Subject: [PATCH 5/7] Fix bullet point formatting --- datasets/doc/source/tutorial-quickstart.ipynb | 4 +++- datasets/doc/source/tutorial-use-partitioners.ipynb | 3 ++- .../source/tutorial-visualize-label-distribution.ipynb | 8 +++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/datasets/doc/source/tutorial-quickstart.ipynb b/datasets/doc/source/tutorial-quickstart.ipynb index 17ab964206b5..d0f37ed311dd 100644 --- a/datasets/doc/source/tutorial-quickstart.ipynb +++ b/datasets/doc/source/tutorial-quickstart.ipynb @@ -510,7 +510,9 @@ "## Next \n", "\n", "This is the first quickstart tutorial from the Flower Datasets series. See other tutorials:\n", - "* [Use `Partitioner`s](https://flower.ai/docs/datasets/tutorial-use-partitioners.html)\n", + "\n", + "* [Use Partitioners](https://flower.ai/docs/datasets/tutorial-use-partitioners.html)\n", + "\n", "* [Visualize Label Distribution](https://flower.ai/docs/datasets/tutorial-visualize-label-distribution.html)" ] } diff --git a/datasets/doc/source/tutorial-use-partitioners.ipynb b/datasets/doc/source/tutorial-use-partitioners.ipynb index 4a303b4ec4df..c9e9303d0e86 100644 --- a/datasets/doc/source/tutorial-use-partitioners.ipynb +++ b/datasets/doc/source/tutorial-use-partitioners.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Use `Partitioner`s\n", + "# Use Partitioners\n", "\n", "The aim of this tutorial is to make you familiar with the available `Partitioner`s that `Flower Datasets` have out-of-the-box." ] @@ -346,6 +346,7 @@ "* [Visualize Label Distribution](https://flower.ai/docs/datasets/tutorial-visualize-label-distribution.html)\n", "\n", "Previous tutorials:\n", + "\n", "* [Quickstart Basics](https://flower.ai/docs/datasets/tutorial-quickstart.html)" ] } diff --git a/datasets/doc/source/tutorial-visualize-label-distribution.ipynb b/datasets/doc/source/tutorial-visualize-label-distribution.ipynb index 81607844cd1e..f00cc2f43aa3 100644 --- a/datasets/doc/source/tutorial-visualize-label-distribution.ipynb +++ b/datasets/doc/source/tutorial-visualize-label-distribution.ipynb @@ -1084,7 +1084,7 @@ "source": [ "## More resources\n", "\n", - "If you are looking for more resorces, feel free to check:\n", + "If you are looking for more resources, feel free to check:\n", "\n", "* `flwr-dataset` documentation\n", " * [plot_label_distributions](https://flower.ai/docs/datasets/ref-api/flwr_datasets.visualization.plot_label_distributions.html#flwr_datasets.visualization.plot_label_distributions)\n", @@ -1095,11 +1095,13 @@ " * or plot directly using pandas object [pd.DataFrame.plot](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html)\n", "\n", "\n", - "This was the tutorial from the series. \n", + "This was the last tutorial. \n", "\n", "Previous tutorials:\n", + "\n", "* [Quickstart Basics](https://flower.ai/docs/datasets/tutorial-quickstart.html)\n", - "* [Use `Partitioner`s](https://flower.ai/docs/datasets/tutorial-use-partitioners.html)" + "\n", + "* [Use Partitioners](https://flower.ai/docs/datasets/tutorial-use-partitioners.html)" ] } ], From 8f417c2e60cf21ac27ad28c9c7949f3ba7b40763 Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Wed, 24 Jul 2024 16:36:39 +0200 Subject: [PATCH 6/7] Fix naming --- datasets/doc/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasets/doc/source/index.rst b/datasets/doc/source/index.rst index c90edea6423d..79fdf97af67e 100644 --- a/datasets/doc/source/index.rst +++ b/datasets/doc/source/index.rst @@ -26,7 +26,7 @@ A learning-oriented series of tutorials is the best place to start. :caption: Tutorial tutorial-quickstart - tutorial-use-partitioner + tutorial-use-partitioners tutorial-visualize-label-distribution How-to guides From 181e66ae9be513598793b867fb919f374a236995 Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Wed, 24 Jul 2024 16:39:16 +0200 Subject: [PATCH 7/7] Rename for clarity and keep common convention --- datasets/doc/source/tutorial-use-partitioners.ipynb | 2 +- .../doc/source/tutorial-visualize-label-distribution.ipynb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/datasets/doc/source/tutorial-use-partitioners.ipynb b/datasets/doc/source/tutorial-use-partitioners.ipynb index c9e9303d0e86..72fabda1504e 100644 --- a/datasets/doc/source/tutorial-use-partitioners.ipynb +++ b/datasets/doc/source/tutorial-use-partitioners.ipynb @@ -6,7 +6,7 @@ "source": [ "# Use Partitioners\n", "\n", - "The aim of this tutorial is to make you familiar with the available `Partitioner`s that `Flower Datasets` have out-of-the-box." + "Understand `Partitioner`s interactions with `FederatedDataset`." ] }, { diff --git a/datasets/doc/source/tutorial-visualize-label-distribution.ipynb b/datasets/doc/source/tutorial-visualize-label-distribution.ipynb index f00cc2f43aa3..d37edde78559 100644 --- a/datasets/doc/source/tutorial-visualize-label-distribution.ipynb +++ b/datasets/doc/source/tutorial-visualize-label-distribution.ipynb @@ -13,9 +13,9 @@ "id": "67c54a8d7c872547", "metadata": {}, "source": [ - "If you partition datasets to simulate heterogeneity through label skew and/or size skew, you can now effortlessly visualize the partitioned dataset using `flwr-datasets`.\n", + "Learn how to visualize and compare partitioned datasets when applying different `Partitioner`s or parameters.\n", "\n", - "In this how-to guide, you'll learn how to visualize and compare partitioned datasets when applying different methods or parameters.\n", + "If you partition datasets to simulate heterogeneity through label skew and/or size skew, you can now effortlessly visualize the partitioned dataset using `flwr-datasets`.\n", "\n", "All the described visualization functions are compatible with all ``Partitioner`` you can find in\n", "[flwr_datasets.partitioner](https://flower.ai/docs/datasets/ref-api/flwr_datasets.partitioner.html#module-flwr_datasets.partitioner)\n"