Skip to content

Commit

Permalink
feat(datasets) Improve error message for incorrect dataset type (#4114)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-narozniak authored Sep 13, 2024
1 parent 541064b commit 1c894d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion datasets/flwr_datasets/federated_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ def _prepare_dataset(self) -> None:
raise ValueError(
"Probably one of the specified parameter in `load_dataset_kwargs` "
"change the return type of the datasets.load_dataset function. "
"Make sure to use parameter such that the return type is DatasetDict."
"Make sure to use parameter such that the return type is DatasetDict. "
f"The return type is currently: {type(self._dataset)}."
)
if self._shuffle:
# Note it shuffles all the splits. The self._dataset is DatasetDict
Expand Down

0 comments on commit 1c894d2

Please sign in to comment.