How do i batch in streaming of data set

I’m Using streaming for data set Data set

How do i do batch in case where i stream the data set and what is the benefit of it ?

1 Like

This might be it. The benefit is probably that it will be processed in parallel according to the number of workers?

Now you can iterate on batches using

for batch in train_ds.iter(batch_size=32):
    ...