# Does Trainer.train repeat streaming dataset when max\_steps is not reached?

**URL:** <https://discuss.huggingface.co/t/does-trainer-train-repeat-streaming-dataset-when-max-steps-is-not-reached/41108>\
**Category:** Intermediate\
**Created:** [May 26, 2023, 6:39pm UTC](https://discuss.huggingface.co/t/does-trainer-train-repeat-streaming-dataset-when-max-steps-is-not-reached/41108 "2023-05-26T18:39:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tzuhsial](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tzuhsial](https://discuss.huggingface.co/u/tzuhsial)\
**Post date:** [May 26, 2023, 6:39pm UTC](https://discuss.huggingface.co/t/does-trainer-train-repeat-streaming-dataset-when-max-steps-is-not-reached/41108/1 "2023-05-26T18:39:10Z")

</div>

I am using a streaming dataset `streaming=True`, and running preprocessing on the fly. I know the number of instances in the dataset. I am using `Trainer` and would like to iterate the streaming dataset 10 times by setting `max_steps`

Does the Trainer.train automatically repeats the streaming dataset if `max_steps` is not reached?
