The subfolders in the config don't match the paths to the data. Therefore one can't stream the data with just the subset name e.g.

dataset = load_dataset("allenai/olmo-mix-1124",
    name="arxiv",
    split="train",
    streaming=True
    )

This change should make streaming subsets work, but I can't test it beforehand.

Ai2 org
edited Jul 6

Hi, thanks for the submission! You're right - seems to be a mismatch. I verified that this PR will allow the data to be streamed using the following code:

from datasets import load_dataset

ds = load_dataset(
    "allenai/olmo-mix-1124",
    name="arxiv", 
    split="train",
    streaming=True,
    revision="refs/pr/8",   # point at the PR branch
)
print(next(iter(ds)))       # should yield the first example without errors

which yielded the following:
{'added': '2024-02-18T23:41:25.453Z', 'attributes': {'paloma_paragraphs': []}, 'created': '2018-02-27T02:01:58.000Z', 'doc': {'arxiv_id': '1802.08750', 'language': 'en', 'timestamp': . . .

Conversely, the current version of the repo (commenting out revision="refs/pr/8")

yields:

---------------------------------------------------------------------------
StopIteration                             Traceback (most recent call last)
Cell In[39], line 11
      1 from datasets import load_dataset
      3 ds = load_dataset(
      4     "allenai/olmo-mix-1124",
      5     name="arxiv", 
   (...)
      8     #revision="refs/pr/8",   # current version, before PR
      9 )
---> 11 print(next(iter(ds)))       # gives an error

StopIteration:

and when streaming=False, yields DatasetGenerationError: An error occurred while generating the dataset.

baileyk changed pull request status to merged
Ai2 org

Sign up or log in to comment