slice split while streaming
COLLABORATOR
Hi! Yes, that's correct. When `streaming` is `True`, only split names can be specified as `split`, and for slicing, you have to use `.skip`/`.take` instead.

E.g. 
`load_dataset("lhoestq/demo1",revision=None, streaming=True, split="train[:3]")`

rewritten with `.skip`/`.take`:
`load_dataset("lhoestq/demo1",revision=None, streaming=True, split="train").take(3)`



2023-01-24T14:29:27Z
https://github.com/huggingface/datasets/issues/5458#issuecomment-1402041857
https://api.github.com/repos/huggingface/datasets/issues/5458
IC_kwDODunzps5TkXYB
https://api.github.com/repos/huggingface/datasets/issues/comments/1402041857/reactions
2023-01-24T14:29:27Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1402041857
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
NONE
Thank you for your quick response!
2023-01-24T15:10:51Z
https://github.com/huggingface/datasets/issues/5458#issuecomment-1402104146
https://api.github.com/repos/huggingface/datasets/issues/5458
IC_kwDODunzps5TkmlS
https://api.github.com/repos/huggingface/datasets/issues/comments/1402104146/reactions
2023-01-24T15:10:51Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1402104146
https://avatars.githubusercontent.com/u/122370631?v=4
https://api.github.com/users/SvenDS9/events{/privacy}
https://api.github.com/users/SvenDS9/followers
https://api.github.com/users/SvenDS9/following{/other_user}
https://api.github.com/users/SvenDS9/gists{/gist_id}
https://github.com/SvenDS9
SvenDS9
U_kgDOB0s6Rw
https://api.github.com/users/SvenDS9/orgs
https://api.github.com/users/SvenDS9/received_events
https://api.github.com/users/SvenDS9/repos
https://api.github.com/users/SvenDS9/starred{/owner}{/repo}
https://api.github.com/users/SvenDS9/subscriptions
User
https://api.github.com/users/SvenDS9
public
### Describe the bug

When using the `load_dataset` function with streaming set to True, slicing splits is apparently not supported.

Did I miss this in the documentation?

### Steps to reproduce the bug

`load_dataset("lhoestq/demo1",revision=None, streaming=True, split="train[:3]")`

causes ValueError: Bad split: train[:3]. Available splits: ['train', 'test'] in builder.py, line 1213, in as_streaming_dataset

### Expected behavior

The first 3 entries of the dataset as a stream

### Environment info

- `datasets` version: 2.8.0
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.10.9
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
