The dir name and split strings are confused when loading ArmelR/stack-exchange-instruction dataset
MEMBER
Thanks for reporting, @DongHande.

I think the issue is caused by the metadata in the dataset card: in the header of the `README.md`, they state that the dataset has 4 splits ("finetune", "reward", "rl", "evaluation"). 
```yaml
  splits:
    - name: finetune
      num_bytes: 6674567576
      num_examples: 3000000
    - name: reward
      num_bytes: 6674341521
      num_examples: 3000000
    - name: rl
      num_bytes: 6679279968
      num_examples: 3000000
    - name: evaluation
      num_bytes: 4022714493
      num_examples: 1807695
```


I guess the user wanted to define these as configs, instead of splits. This is not yet supported for no-script datasets, but will be soon supported. See:
- #5331

I think we should contact the dataset author to inform about the issue with the split names, as you already did: https://huggingface.co/datasets/ArmelR/stack-exchange-instruction/discussions/1
Let's continue the discussion there!
2023-05-26T07:32:53Z
https://github.com/huggingface/datasets/issues/5895#issuecomment-1563936736
https://api.github.com/repos/huggingface/datasets/issues/5895
IC_kwDODunzps5dN8fg
https://api.github.com/repos/huggingface/datasets/issues/comments/1563936736/reactions
2023-05-26T08:36:06Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1563936736
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
NONE
Thank you! It has been fixed. 
2023-05-29T02:32:12Z
https://github.com/huggingface/datasets/issues/5895#issuecomment-1566409215
https://api.github.com/repos/huggingface/datasets/issues/5895
IC_kwDODunzps5dXYH_
https://api.github.com/repos/huggingface/datasets/issues/comments/1566409215/reactions
2023-05-29T02:32:12Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1566409215
https://avatars.githubusercontent.com/u/45357817?v=4
https://api.github.com/users/DongHande/events{/privacy}
https://api.github.com/users/DongHande/followers
https://api.github.com/users/DongHande/following{/other_user}
https://api.github.com/users/DongHande/gists{/gist_id}
https://github.com/DongHande
DongHande
MDQ6VXNlcjQ1MzU3ODE3
https://api.github.com/users/DongHande/orgs
https://api.github.com/users/DongHande/received_events
https://api.github.com/users/DongHande/repos
https://api.github.com/users/DongHande/starred{/owner}{/repo}
https://api.github.com/users/DongHande/subscriptions
User
https://api.github.com/users/DongHande
public
### Describe the bug

When I load the ArmelR/stack-exchange-instruction dataset, I encounter a bug that may be raised by confusing the dir name string and the split string about the dataset. 

When I use the script "datasets.load_dataset('ArmelR/stack-exchange-instruction', data_dir="data/finetune", split="train", use_auth_token=True)", it fails. But it succeeds when I add the "streaming = True" parameter. 

The website of the dataset is https://huggingface.co/datasets/ArmelR/stack-exchange-instruction/ .

The traceback logs are as below: 

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/load.py", line 1797, in load_dataset
    builder_instance.download_and_prepare(
  File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/builder.py", line 890, in download_and_prepare
    self._download_and_prepare(
  File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/builder.py", line 985, in _download_and_prepare
    self._prepare_split(split_generator, **prepare_split_kwargs)
  File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/builder.py", line 1706, in _prepare_split
    split_info = self.info.splits[split_generator.name]
  File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/splits.py", line 530, in __getitem__
    instructions = make_file_instructions(
  File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/arrow_reader.py", line 112, in make_file_instructions
    name2filenames = {
  File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/arrow_reader.py", line 113, in <dictcomp>
    info.name: filenames_for_dataset_split(
  File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/naming.py", line 70, in filenames_for_dataset_split
    prefix = filename_prefix_for_split(dataset_name, split)
  File "/home/xxx/miniconda3/envs/code/lib/python3.9/site-packages/datasets/naming.py", line 54, in filename_prefix_for_split
    if os.path.basename(name) != name:
  File "/home/xxx/miniconda3/envs/code/lib/python3.9/posixpath.py", line 142, in basename
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType





### Steps to reproduce the bug

1. import datasets library function: ```from datasets import load_dataset```
2. load dataset: ```ds=load_dataset('ArmelR/stack-exchange-instruction', data_dir="data/finetune", split="train", use_auth_token=True)```

### Expected behavior

The dataset can be loaded successfully without the streaming setting. 

### Environment info

Linux, 
python=3.9
datasets=2.12.0