Skip to content

Commit

Permalink
Update the load function to correctly parse datasets using the HF nam…
Browse files Browse the repository at this point in the history
…ing formatting.

PiperOrigin-RevId: 576246314
  • Loading branch information
The TensorFlow Datasets Authors committed Oct 24, 2023
1 parent bea9e95 commit 5764416
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tensorflow_datasets/core/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,11 @@ def load(
object documents the entire dataset, regardless of the `split` requested.
Split-specific information is available in `ds_info.splits`.
"""
# If the dataset belongs to the Huggingface namespace, we convert its name to
# use TFDS accepted format.
if name.startswith('huggingface:'):
name = huggingface_dataset_builder.from_hf_to_tfds(name)

dbuilder = _fetch_builder(
name,
data_dir,
Expand Down

0 comments on commit 5764416

Please sign in to comment.