Skip to content

Commit

Permalink
Resolved for empty datafiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahil Lihas authored and Sahil Lihas committed Dec 9, 2024
1 parent 661d7ba commit ab76a8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/datasets/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -1871,6 +1871,7 @@ def load_dataset_builder(
if (
path in _PACKAGED_DATASETS_MODULES
and data_files is None
and not data_files
and dataset_module.builder_configs_parameters.builder_configs[0].data_files is None
):
error_msg = f"Please specify the data files or data directory to load for the {path} dataset builder."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _info(self):
return datasets.DatasetInfo(features=self.config.features)

def _split_generators(self, dl_manager):
if not self.config.data_files:
if self.config.data_files is not None and not self.config.data_files:
raise ValueError(f"At least one data file must be specified, but got data_files={self.config.data_files}")
dl_manager.download_config.extract_on_the_fly = True
# Do an early pass if:
Expand Down

0 comments on commit ab76a8b

Please sign in to comment.