Skip to content

Commit

Permalink
Rename _resplitter to _preprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-narozniak committed May 20, 2024
1 parent 0f9ffc0 commit e7ca53c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datasets/flwr_datasets/federated_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __init__(
_check_if_dataset_tested(dataset)
self._dataset_name: str = dataset
self._subset: Optional[str] = subset
self._resplitter: Optional[Preprocessor] = _instantiate_resplitter_if_needed(
self._preprocessor: Optional[Preprocessor] = _instantiate_resplitter_if_needed(
preprocessor
)
self._partitioners: Dict[str, Partitioner] = _instantiate_partitioners(
Expand Down Expand Up @@ -244,8 +244,8 @@ def _prepare_dataset(self) -> None:
# Note it shuffles all the splits. The self._dataset is DatasetDict
# so e.g. {"train": train_data, "test": test_data}. All splits get shuffled.
self._dataset = self._dataset.shuffle(seed=self._seed)
if self._resplitter:
self._dataset = self._resplitter(self._dataset)
if self._preprocessor:
self._dataset = self._preprocessor(self._dataset)
self._dataset_prepared = True

def _check_if_no_split_keyword_possible(self) -> None:
Expand Down

0 comments on commit e7ca53c

Please sign in to comment.