# Huggingface datasets - reset/restart state

**URL:** <https://discuss.huggingface.co/t/huggingface-datasets-reset-restart-state/36743>\
**Category:** 🤗Datasets\
**Created:** [April 16, 2023, 11:45am UTC](https://discuss.huggingface.co/t/huggingface-datasets-reset-restart-state/36743 "2023-04-16T11:45:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ndvb](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ndvb/32/17239_2.png) [@ndvb](https://discuss.huggingface.co/u/ndvb)\
**Post date:** [April 16, 2023, 11:45am UTC](https://discuss.huggingface.co/t/huggingface-datasets-reset-restart-state/36743/1 "2023-04-16T11:45:16Z")

</div>

How can I “restart” a dataset, or reset it’s enumerator state, so I can reuse it again?

---

<div class="post-metadata">

**Author:** ![lhoestq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lhoestq/32/64813_2.png) [@lhoestq](https://discuss.huggingface.co/u/lhoestq)\
**Post date:** [April 16, 2023, 11:42pm UTC](https://discuss.huggingface.co/t/huggingface-datasets-reset-restart-state/36743/2 "2023-04-16T23:42:35Z")

</div>

Datasets have no state: you can start iterating a dataset, stop, and restart iterating and it will start from the beginning.

---

<div class="post-metadata">

**Author:** ![lhoestq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lhoestq/32/64813_2.png) [@lhoestq](https://discuss.huggingface.co/u/lhoestq)\
**Post date:** [March 5, 2025, 2:50pm UTC](https://discuss.huggingface.co/t/huggingface-datasets-reset-restart-state/36743/3 "2025-03-05T14:50:41Z")

</div>

Update from 2025 for streaming datasets (IterableDataset): you can checkpoint and resume the iteration, see the docs [here](https://huggingface.co/docs/datasets/en/stream#save-a-dataset-checkpoint-and-resume-iteration)
