Fix `languages=` usage example — it raises ValueError since the parquet conversion

#18
by devsinghi - opened

The README's fourth usage example doesn't run. languages= was a loading-script
parameter, and the script was removed when this dataset moved to parquet, so the kwarg
is no longer accepted.

load_dataset("facebook/voxpopuli", "multilang", languages=["hr", "sk", "sl", "cs", "pl"])
# ValueError: BuilderConfig ParquetConfig(name='multilang', ...) doesn't have a 'languages' key

Tested

datasets==5.0.1, all four examples from the README, exactly as written:

example result
load_dataset("facebook/voxpopuli", "hr") works
load_dataset("facebook/voxpopuli", "multilang") works
load_dataset("facebook/voxpopuli", "multilang", languages=[...]) ValueError
load_dataset("facebook/voxpopuli", "en_accented") works

The failing case was run through load_dataset() itself — it raises during config
resolution, before any download. The three passing cases were checked with
load_dataset_builder() to avoid pulling the audio; that's the same config-resolution
path, so it confirms the configs resolve but not that the data downloads cleanly.

Fix

Replace the example with the parquet equivalent — load each language config and
concatenate:

from datasets import concatenate_datasets

languages = ["hr", "sk", "sl", "cs", "pl"]
voxpopuli_slavic = concatenate_datasets(
    [load_dataset("facebook/voxpopuli", language, split="train") for language in languages]
)

All five language configs (hr, sk, sl, cs, pl) were verified to resolve with
train/validation/test splits. README only; no data or config files touched.

Possibly related

Issues #11,
#12,
#13 and
#14 all report load
failures using trust_remote_code=True, i.e. the old script path. Those should be
resolved by the parquet conversion — worth closing if so, though I haven't reproduced
each one.

Also minor: en_accented has only a test split, which the README doesn't mention.

@lhoestq @polinaeterna — tagging you as this is a small follow-up to #16.

The parquet conversion dropped the loading script, so languages= is no longer an accepted kwarg, but the README still documents it as the way to load a subset of languages:

load_dataset("facebook/voxpopuli", "multilang", languages=["hr", "sk", "sl", "cs", "pl"])
# ValueError: BuilderConfig ParquetConfig(name='multilang', ...) doesn't have a 'languages' key

The other three examples in that section still work — I tested all four on datasets 5.0.1. This PR swaps the broken one for the parquet equivalent (load each language config and concatenate). README only.

Also possibly worth a look while you're here: #11–#14 all report load failures using trust_remote_code=True, which is the old script path — those look like the conversion already fixed them.

No urgency, and happy to redirect if someone else is better placed.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment