Support numpy/torch/tf/jax formatting for IterableDataset
NONE
hii @lhoestq, can you assign this issue to me? Though i am new to open source still I would love to put my best foot forward. I can see there isn't anyone right now assigned to this issue.
2023-10-09T12:26:58Z
https://github.com/huggingface/datasets/issues/5083#issuecomment-1752916317
https://api.github.com/repos/huggingface/datasets/issues/5083
IC_kwDODunzps5oe2Fd
https://api.github.com/repos/huggingface/datasets/issues/comments/1752916317/reactions
2023-10-09T12:26:58Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1752916317
https://avatars.githubusercontent.com/u/95092167?v=4
https://api.github.com/users/zutarich/events{/privacy}
https://api.github.com/users/zutarich/followers
https://api.github.com/users/zutarich/following{/other_user}
https://api.github.com/users/zutarich/gists{/gist_id}
https://github.com/zutarich
zutarich
U_kgDOBar9xw
https://api.github.com/users/zutarich/orgs
https://api.github.com/users/zutarich/received_events
https://api.github.com/users/zutarich/repos
https://api.github.com/users/zutarich/starred{/owner}{/repo}
https://api.github.com/users/zutarich/subscriptions
User
https://api.github.com/users/zutarich
public
MEMBER
Hi @zutarich ! This issue was fixed by #5852 - sorry I forgot to close it

Feel free to look for other issues and ping me or @mariosasko if you have questions :)
Also let us know if we can help find an issue that can correspond to what you're looking for
2023-10-09T12:42:08Z
https://github.com/huggingface/datasets/issues/5083#issuecomment-1752939547
https://api.github.com/repos/huggingface/datasets/issues/5083
IC_kwDODunzps5oe7wb
https://api.github.com/repos/huggingface/datasets/issues/comments/1752939547/reactions
2023-10-09T12:42:08Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1752939547
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
Right now `IterableDataset` doesn't do any formatting.

In particular this code should return a numpy array:
```python
from datasets import load_dataset

ds = load_dataset("imagenet-1k", split="train", streaming=True).with_format("np")
print(next(iter(ds))["image"])
```

Right now it returns a PIL.Image.

Setting `streaming=False` does return a numpy array after #5072 