From 1c894d22da6e5d1099b1b7e4e5a38699e8d5228b Mon Sep 17 00:00:00 2001 From: Adam Narozniak <51029327+adam-narozniak@users.noreply.github.com> Date: Fri, 13 Sep 2024 12:28:59 +0200 Subject: [PATCH] feat(datasets) Improve error message for incorrect dataset type (#4114) --- datasets/flwr_datasets/federated_dataset.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datasets/flwr_datasets/federated_dataset.py b/datasets/flwr_datasets/federated_dataset.py index 64544b1c4463..72ea54773564 100644 --- a/datasets/flwr_datasets/federated_dataset.py +++ b/datasets/flwr_datasets/federated_dataset.py @@ -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