From 28af927da52105d061bd0c2b53a3ef6575d5f651 Mon Sep 17 00:00:00 2001 From: Adam Narozniak Date: Thu, 11 Jul 2024 10:43:56 +0200 Subject: [PATCH] Raname method name for clarity --- .../flwr_datasets/partitioner/pathological_partitioner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datasets/flwr_datasets/partitioner/pathological_partitioner.py b/datasets/flwr_datasets/partitioner/pathological_partitioner.py index 519f6de76449..45d0016fa5b8 100644 --- a/datasets/flwr_datasets/partitioner/pathological_partitioner.py +++ b/datasets/flwr_datasets/partitioner/pathological_partitioner.py @@ -156,7 +156,7 @@ def _determine_partition_id_to_indices_if_needed(self) -> None: return self._determine_partition_id_to_unique_labels() assert self._unique_labels is not None - self._determine_unique_label_to_times_used() + self._count_partitions_having_each_unique_label() labels = np.asarray(self.dataset[self._partition_by]) self._check_correctness_of_unique_label_to_times_used_counter(labels) @@ -258,8 +258,8 @@ def _determine_partition_id_to_unique_labels(self) -> None: f"'first-deterministic'. You provided: {self._class_assignment_mode}." ) - def _determine_unique_label_to_times_used(self) -> None: - """Determine how many times the label is used in the partitions. + def _count_partitions_having_each_unique_label(self) -> None: + """Count the number of partitions that have each unique label. This computation is based on the assigment of the label to the partition_id in the `_determine_partition_id_to_unique_labels` method.