Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
m-danilow committed Jul 24, 2024
1 parent 7ad1616 commit debb7ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datasets/flwr_datasets/mock_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def _load_mocked_dataset_by_partial_download(
The streaming mode has a specific type of accessing the data, the first tuple
value is how many samples to skip, the second is how many samples to take. Due
to this mechanism, diverse samples can be taken (especially if the dataset is
sorted by the natual_id for NaturalIdPartitioner).
sorted by the natural_id for NaturalIdPartitioner).
subset_name: Optional[str]
Name of the subset (passed to load_dataset) e.g. "v0.01" for speech_commands.
Expand Down
8 changes: 4 additions & 4 deletions datasets/flwr_datasets/partitioner/shard_partitioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ def __init__( # pylint: disable=R0913
) -> None:
super().__init__()
# Attributes based on the constructor
_check_if_natual_number(num_partitions, "num_partitions")
_check_if_natural_number(num_partitions, "num_partitions")
self._num_partitions = num_partitions
self._partition_by = partition_by
_check_if_natual_number(
_check_if_natural_number(
num_shards_per_partition, "num_shards_per_partition", True
)
self._num_shards_per_partition = num_shards_per_partition
self._num_shards_used: Optional[int] = None
_check_if_natual_number(shard_size, "shard_size", True)
_check_if_natural_number(shard_size, "shard_size", True)
self._shard_size = shard_size
self._keep_incomplete_shard = keep_incomplete_shard
self._shuffle = shuffle
Expand Down Expand Up @@ -360,7 +360,7 @@ def _check_possibility_of_partitions_creation(self) -> None:
)


def _check_if_natual_number(
def _check_if_natural_number(
number: Optional[int], parameter_name: str, none_acceptable: bool = False
) -> None:
if none_acceptable and number is None:
Expand Down

0 comments on commit debb7ac

Please sign in to comment.