Calling shuffle on IterableDataset will disable batching in case any functions were mapped
{'login': 'amankhandelia', 'id': 7098967, 'node_id': 'MDQ6VXNlcjcwOTg5Njc=', 'avatar_url': 'https://avatars.githubusercontent.com/u/7098967?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/amankhandelia', 'html_url': 'https://github.com/amankhandelia', 'followers_url': 'https://api.github.com/users/amankhandelia/followers', 'following_url': 'https://api.github.com/users/amankhandelia/following{/other_user}', 'gists_url': 'https://api.github.com/users/amankhandelia/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/amankhandelia/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/amankhandelia/subscriptions', 'organizations_url': 'https://api.github.com/users/amankhandelia/orgs', 'repos_url': 'https://api.github.com/users/amankhandelia/repos', 'events_url': 'https://api.github.com/users/amankhandelia/events{/privacy}', 'received_events_url': 'https://api.github.com/users/amankhandelia/received_events', 'type': 'User', 'site_admin': False}
[{'id': 1935892857, 'node_id': 'MDU6TGFiZWwxOTM1ODkyODU3', 'url': 'https://api.github.com/repos/huggingface/datasets/labels/bug', 'name': 'bug', 'color': 'd73a4a', 'default': True, 'description': "Something isn't working"}]
[]
Hi :) Good catch ! Feel free to open a PR if you want to contribute, this would be very welcome ;) Have raised the PR [here](https://github.com/huggingface/datasets/pull/2717) Fixed by #2717.
When using dataset in streaming mode, if one applies `shuffle` method on the dataset and `map` method for which `batched=True` than the batching operation will not happen, instead `batched` will be set to `False`

I did RCA on the dataset codebase, the problem is emerging from [this line of code](https://github.com/huggingface/datasets/blob/d25a0bf94d9f9a9aa6cabdf5b450b9c327d19729/src/datasets/iterable_dataset.py#L197) here as it is
`self.ex_iterable.shuffle_data_sources(seed), function=self.function, batch_size=self.batch_size`, as one can see it is missing batched argument, which means that the iterator fallsback to default constructor value, which in this case is `False`.
To remedy the problem we can change this line to
`self.ex_iterable.shuffle_data_sources(seed), function=self.function, batched=self.batched, batch_size=self.batch_size`

{'url': 'https://api.github.com/repos/huggingface/datasets/issues/2716/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}