Makes the dataset script faster (no need to extract the archives) and streamable.

Should also fix the incorrect paths reported in https://github.com/huggingface/datasets/issues/6801

PS: This version does not explicitly sort the image filenames, as TAR archives preserve the order (if they are read on the fly with tarfile.open/dl_manager.iter_archive)

You can test the PR with ds = load_dataset("nyanko7/danbooru2023", split="train", revision="refs/pr/8", streaming=True).

nyanko7 changed pull request status to merged

Sign up or log in to comment