Skip to content

Commit

Permalink
docs(datasets) Fix Flower Datasets docs (#3929)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-narozniak authored Jul 26, 2024
1 parent 159d248 commit 693ff06
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datasets/doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ 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 = {
"how-to-visualize-label-distribution.html": "tutorial-visualize-label-distribution.html",
"how-to-visualize-label-distribution": "tutorial-visualize-label-distribution.html",
}

# -- Options for HTML output -------------------------------------------------
Expand Down
7 changes: 6 additions & 1 deletion datasets/doc/source/tutorial-quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,11 @@
"## Use with PyTorch/NumPy/TensorFlow\n",
"\n",
"For more detailed instructions, go to:\n",
"\n",
"* [how-to-use-with-pytorch](https://flower.ai/docs/datasets/how-to-use-with-pytorch.html)\n",
"\n",
"* [how-to-use-with-numpy](https://flower.ai/docs/datasets/how-to-use-with-numpy.html)\n",
"\n",
"* [how-to-use-with-tensorflow](https://flower.ai/docs/datasets/how-to-use-with-tensorflow.html)"
]
},
Expand Down Expand Up @@ -443,7 +446,9 @@
"cell_type": "markdown",
"id": "b93678a5",
"metadata": {},
"source": "The `Dataloader` created this way does not return a `Tuple` when iterating over it but a `Dict` with the names of the columns as keys and features as values. Look below for an example."
"source": [
"The `Dataloader` created this way does not return a `Tuple` when iterating over it but a `Dict` with the names of the columns as keys and features as values. Look below for an example."
]
},
{
"cell_type": "code",
Expand Down
6 changes: 3 additions & 3 deletions datasets/doc/source/tutorial-use-partitioners.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"source": [
"### `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`."
"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`."
]
},
{
Expand Down Expand Up @@ -165,7 +165,7 @@
"source": [
"#### 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`."
"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`."
]
},
{
Expand Down Expand Up @@ -261,7 +261,7 @@
"source": [
"#### 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."
"With the [DirichletPartitioner](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."
]
},
{
Expand Down

0 comments on commit 693ff06

Please sign in to comment.