how to ensure to download the latest release for a given language.

#7
by StephennFernandes - opened

i am looking for a way to ensure the latest release of multiple languages to be downloaded, perhaps by using the args date="latest" would this be possible ?
as i am downloading multiple languages, its difficult to check the latest date for every language.

further more, the example script given doesnt work:

from datasets import load_dataset

load_dataset("olm/wikipedia", language="en", date="20220920")

the following is the error thats returned.

 File "/home/user/anaconda3/lib/python3.11/site-packages/datasets/download/download_manager.py", line 451, in _download
    out = cached_path(url_or_filename, download_config=download_config)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/anaconda3/lib/python3.11/site-packages/datasets/utils/file_utils.py", line 188, in cached_path
    output_path = get_from_cache(
                  ^^^^^^^^^^^^^^^
  File "/home/user/anaconda3/lib/python3.11/site-packages/datasets/utils/file_utils.py", line 570, in get_from_cache
    raise FileNotFoundError(f"Couldn't find file at {url}")
FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220920/dumpstatus.json

@lhoestq could you please help me with this ?

it looks like wikipedia no longer uses dumpstatus.json

Wikipedia only keeps the recent dump status.json, so old version of wikipedia are not available anymore.

That's why there is the recently created https://huggingface.co/datasets/wikimedia/wikipedia dataset made for long term storage of wikipedia dumps in Parquet format

@lhoestq i tried the following dataset but i cannot pull the latest release eg: 2024, i could only pull the date that was specified in the example code specified in the model card.

I think the plan is to do one export every ~6 months. Feel free to use the latest date in the meantime (20231101)

Sign up or log in to comment