Enable data streaming

#1
by lhoestq HF staff - opened

using dl_manager.iter_archive in TAR archives

This allows to stream the data using

from datasets import load_dataset

ds = load_dataset("dell-research-harvard/AmericanStories", streaming=True)  # pass revision="refs/pr/1" to try the code from this PR
for example in ds["1774"]:
    print(example)

This should also fix the dataset viewer, which currently shows an error

Dell Research Harvard org

Thanks for your contribution! This functionality has been added via a separate commit. The above streaming code now runs as expected.

tombryan changed pull request status to closed

Sign up or log in to comment