From 59b8c8c7be81b3fff95d64943ce267818a1131ff Mon Sep 17 00:00:00 2001 From: Adam Narozniak <51029327+adam-narozniak@users.noreply.github.com> Date: Wed, 15 Nov 2023 15:51:36 +0100 Subject: [PATCH] Fix spacing around : in parameters in docs (#2601) --- datasets/flwr_datasets/partitioner/iid_partitioner.py | 4 ++-- .../flwr_datasets/partitioner/natural_id_partitioner.py | 2 +- datasets/flwr_datasets/partitioner/partitioner.py | 6 +++--- datasets/flwr_datasets/resplitter/merge_resplitter.py | 2 +- datasets/flwr_datasets/utils.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/datasets/flwr_datasets/partitioner/iid_partitioner.py b/datasets/flwr_datasets/partitioner/iid_partitioner.py index 2df0d7df1ebf..c72b34f081f2 100644 --- a/datasets/flwr_datasets/partitioner/iid_partitioner.py +++ b/datasets/flwr_datasets/partitioner/iid_partitioner.py @@ -24,7 +24,7 @@ class IidPartitioner(Partitioner): Parameters ---------- - num_partitions: int + num_partitions : int The total number of partitions that the data will be divided into. """ @@ -44,7 +44,7 @@ def load_partition(self, node_id: int) -> datasets.Dataset: Returns ------- - dataset_partition: Dataset + dataset_partition : Dataset single dataset partition """ return self.dataset.shard( diff --git a/datasets/flwr_datasets/partitioner/natural_id_partitioner.py b/datasets/flwr_datasets/partitioner/natural_id_partitioner.py index bc6c19cd9cb3..b8f28696f3b7 100644 --- a/datasets/flwr_datasets/partitioner/natural_id_partitioner.py +++ b/datasets/flwr_datasets/partitioner/natural_id_partitioner.py @@ -55,7 +55,7 @@ def load_partition(self, node_id: int) -> datasets.Dataset: Returns ------- - dataset_partition: Dataset + dataset_partition : Dataset single dataset partition """ if len(self._node_id_to_natural_id) == 0: diff --git a/datasets/flwr_datasets/partitioner/partitioner.py b/datasets/flwr_datasets/partitioner/partitioner.py index 7ab15a54d49e..92405152efc6 100644 --- a/datasets/flwr_datasets/partitioner/partitioner.py +++ b/datasets/flwr_datasets/partitioner/partitioner.py @@ -58,12 +58,12 @@ def load_partition(self, node_id: int) -> Dataset: Parameters ---------- - node_id: int + node_id : int the index that corresponds to the requested partition Returns ------- - dataset_partition: Dataset + dataset_partition : Dataset single dataset partition """ @@ -75,7 +75,7 @@ def is_dataset_assigned(self) -> bool: Returns ------- - dataset_assigned: bool + dataset_assigned : bool True if a dataset is assigned, otherwise False. """ return self._dataset is not None diff --git a/datasets/flwr_datasets/resplitter/merge_resplitter.py b/datasets/flwr_datasets/resplitter/merge_resplitter.py index 995b0e8e5602..6bb8f23e60dc 100644 --- a/datasets/flwr_datasets/resplitter/merge_resplitter.py +++ b/datasets/flwr_datasets/resplitter/merge_resplitter.py @@ -32,7 +32,7 @@ class MergeResplitter: Parameters ---------- - merge_config: Dict[str, Tuple[str, ...]] + merge_config : Dict[str, Tuple[str, ...]] Dictionary with keys - the desired split names to values - tuples of the current split names that will be merged together diff --git a/datasets/flwr_datasets/utils.py b/datasets/flwr_datasets/utils.py index 49c65e9893a7..61fdc5b1db83 100644 --- a/datasets/flwr_datasets/utils.py +++ b/datasets/flwr_datasets/utils.py @@ -38,12 +38,12 @@ def _instantiate_partitioners( Parameters ---------- - partitioners: Dict[str, Union[Partitioner, int]] + partitioners : Dict[str, Union[Partitioner, int]] Dataset split to the Partitioner or a number of IID partitions. Returns ------- - partitioners: Dict[str, Partitioner] + partitioners : Dict[str, Partitioner] Partitioners specified as split to Partitioner object. """ instantiated_partitioners: Dict[str, Partitioner] = {}