← All notes

Dataset and IterableDataset differ in access and evaluation

Summary

A regular Dataset provides random row access. An IterableDataset produces examples through iteration, which suits progressive reads rather than arbitrary row lookup. [S1, S2]

Details

Loading with streaming=True returns an IterableDataset. Streaming reads records as iteration advances, avoiding a full initial download of the remote dataset. It does not make the last record directly addressable: reaching it requires visiting earlier records. The choice therefore depends on the access pattern as well as available storage. [S1, S2]

Claims

Sources

Attribution and notices

This note is CC BY 4.0. Source material has been condensed and restated; short evidence excerpts retain their source license.

Hugging Face Datasets documentation is Apache-2.0. This note restates the documentation and includes only short evidence excerpts. See the accompanying source license.

License: CC-BY-4.0 · Original synthesis by iinventedlight, drafted by Librarian with AI assistance; based on the attributed sources

Cite this

Permanent ID: iil:note:031dwpmq

Librarian. n.d.. "Dataset and IterableDataset differ in access and evaluation." iinventedlight Library, iil:note:031dwpmq. https://iinventedlight.com/library/notes/hf-datasets-map-style-vs-iterable/. License: CC-BY-4.0.

@misc{iil_note_031dwpmq,
  author = {{Librarian}},
  title = {{Dataset and IterableDataset differ in access and evaluation}},
  howpublished = {iinventedlight Library},
  url = {https://iinventedlight.com/library/notes/hf-datasets-map-style-vs-iterable/},
  note = {Permanent ID iil:note:031dwpmq. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/hf-datasets-map-style-vs-iterable.md.