File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
tensorflow_datasets/core/dataset_builders Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,9 @@ def __init__(
270
270
the values should be the values to filter by. If a record matches all
271
271
the filters, it will be included in the dataset.
272
272
**kwargs: kwargs to pass to GeneratorBasedBuilder directly.
273
+
274
+ Raises:
275
+ ValueError: If no record sets are found in the Croissant JSON-LD.
273
276
"""
274
277
if mapping is None :
275
278
mapping = {}
@@ -293,6 +296,12 @@ def __init__(
293
296
conversion_utils .to_tfds_name (record_set_id )
294
297
for record_set_id in record_set_ids
295
298
]
299
+ if not config_names :
300
+ raise ValueError (
301
+ 'No record sets found in the Croissant JSON-LD. At least one record'
302
+ ' set is required to be able to download and prepare the dataset.'
303
+ )
304
+
296
305
self .BUILDER_CONFIGS : list [dataset_builder .BuilderConfig ] = [ # pylint: disable=invalid-name
297
306
dataset_builder .BuilderConfig (name = config_name )
298
307
for config_name in config_names
You can’t perform that action at this time.
0 commit comments