load_dataset method returns Unknown split "validation" even if this dir exists
NONE
I don't know the main problem but it looks like, it is ignoring the last directory in your case. So, create a directory called 'zzz' in the same folder as train, validation and test. if it doesn't work, create a directory called "aaa". It worked for me.

2022-09-15T07:37:21Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1247701025
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5KXmgh
https://api.github.com/repos/huggingface/datasets/issues/comments/1247701025/reactions
2022-09-15T07:37:21Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1247701025
https://avatars.githubusercontent.com/u/71820487?v=4
https://api.github.com/users/MarkosMuche/events{/privacy}
https://api.github.com/users/MarkosMuche/followers
https://api.github.com/users/MarkosMuche/following{/other_user}
https://api.github.com/users/MarkosMuche/gists{/gist_id}
https://github.com/MarkosMuche
MarkosMuche
MDQ6VXNlcjcxODIwNDg3
https://api.github.com/users/MarkosMuche/orgs
https://api.github.com/users/MarkosMuche/received_events
https://api.github.com/users/MarkosMuche/repos
https://api.github.com/users/MarkosMuche/starred{/owner}{/repo}
https://api.github.com/users/MarkosMuche/subscriptions
User
https://api.github.com/users/MarkosMuche
public
CONTRIBUTOR
@SamSamhuns could you please try to load it with the current main-branch version of `datasets`? I suppose the problem is that it tries to get splits names from filenames in this case, ignoring directories names,  but `val` wasn't in keywords at that time, but it was fixed recently in this PR  https://github.com/huggingface/datasets/pull/4844. 
2022-09-15T09:51:27Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1247864157
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5KYOVd
https://api.github.com/repos/huggingface/datasets/issues/comments/1247864157/reactions
2022-09-15T09:51:27Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1247864157
https://avatars.githubusercontent.com/u/16348744?v=4
https://api.github.com/users/polinaeterna/events{/privacy}
https://api.github.com/users/polinaeterna/followers
https://api.github.com/users/polinaeterna/following{/other_user}
https://api.github.com/users/polinaeterna/gists{/gist_id}
https://github.com/polinaeterna
polinaeterna
MDQ6VXNlcjE2MzQ4NzQ0
https://api.github.com/users/polinaeterna/orgs
https://api.github.com/users/polinaeterna/received_events
https://api.github.com/users/polinaeterna/repos
https://api.github.com/users/polinaeterna/starred{/owner}{/repo}
https://api.github.com/users/polinaeterna/subscriptions
User
https://api.github.com/users/polinaeterna
public
NONE
I have a similar problem.
When I try to create `data_infos.json` using `datasets-cli test Peter.py --save_infos --all_configs` I get an error:
`ValueError: Unknown split "test". Should be one of ['train'].`

The `data_infos.json` is created perfectly fine when I use only one split - `datasets.Split.TRAIN`

@polinaeterna  Could you help here please?

You can find the code here: https://huggingface.co/datasets/sberbank-ai/Peter/tree/add_splits (add_splits branch)
2022-09-15T11:30:05Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1247975569
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5KYpiR
https://api.github.com/repos/huggingface/datasets/issues/comments/1247975569/reactions
2022-09-15T11:36:25Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1247975569
https://avatars.githubusercontent.com/u/26695348?v=4
https://api.github.com/users/skalinin/events{/privacy}
https://api.github.com/users/skalinin/followers
https://api.github.com/users/skalinin/following{/other_user}
https://api.github.com/users/skalinin/gists{/gist_id}
https://github.com/skalinin
skalinin
MDQ6VXNlcjI2Njk1MzQ4
https://api.github.com/users/skalinin/orgs
https://api.github.com/users/skalinin/received_events
https://api.github.com/users/skalinin/repos
https://api.github.com/users/skalinin/starred{/owner}{/repo}
https://api.github.com/users/skalinin/subscriptions
User
https://api.github.com/users/skalinin
public
COLLABORATOR
@skalinin It seems the `dataset_infos.json` of your dataset is missing the info on the test split (and `datasets-cli` doesn't ignore the cached infos at the moment, which is a known bug), so your issue is not related to this one. I think you can fix your issue by deleting all the cached `dataset_infos.json` (in the local repo and in `~/.cache/huggingface/modules`) before running the `datasets-cli test` command. Let us know if that doesn't help, and I can try to generate it myself.
2022-09-15T15:00:59Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1248227130
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5KZm86
https://api.github.com/repos/huggingface/datasets/issues/comments/1248227130/reactions
2022-09-15T15:02:32Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1248227130
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
COLLABORATOR
This code indeed behaves as expected on `main`. But suppose the `val_234.png` is renamed to some other value not containing one of [these](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L31) keywords, in that case, this issue becomes relevant again because the real cause of it is the order in which we check the predefined split patterns to assign data files to each split - first we assign data files based on filenames, and only if this fails meaning not a single split found (`val` is not recognized here in the older versions of `datasets`, which results in an empty `validation` split), do we assign based on directory names.

@polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if `data_dir` is specified (or if `load_dataset(data_dir)` is called)? 
2022-09-15T15:33:11Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1248269550
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5KZxTu
https://api.github.com/repos/huggingface/datasets/issues/comments/1248269550/reactions
2022-09-15T15:33:11Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1248269550
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
MEMBER
> @polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if data_dir is specified (or if load_dataset(data_dir) is called)?

yes that makes sense !
2022-09-15T15:39:21Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1248276854
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5KZzF2
https://api.github.com/repos/huggingface/datasets/issues/comments/1248276854/reactions
2022-09-15T15:39:21Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1248276854
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
NONE
Looks like the `val/validation` dir name issue is fixed with the current main-branch version of the `datasets` repository. 

> @polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if data_dir is specified (or if load_dataset(data_dir) is called)?

I agree with this as well. I would expect higher precedence to the directory name over the file name. Right now if I place a single file named `train_00001.jpg` under the `validation` directory, `load_dataset` cannot find the validation split.
2022-09-16T06:25:52Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1248966688
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5Kcbgg
https://api.github.com/repos/huggingface/datasets/issues/comments/1248966688/reactions
2022-09-16T06:25:52Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1248966688
https://avatars.githubusercontent.com/u/13418507?v=4
https://api.github.com/users/SamSamhuns/events{/privacy}
https://api.github.com/users/SamSamhuns/followers
https://api.github.com/users/SamSamhuns/following{/other_user}
https://api.github.com/users/SamSamhuns/gists{/gist_id}
https://github.com/SamSamhuns
SamSamhuns
MDQ6VXNlcjEzNDE4NTA3
https://api.github.com/users/SamSamhuns/orgs
https://api.github.com/users/SamSamhuns/received_events
https://api.github.com/users/SamSamhuns/repos
https://api.github.com/users/SamSamhuns/starred{/owner}{/repo}
https://api.github.com/users/SamSamhuns/subscriptions
User
https://api.github.com/users/SamSamhuns
public
NONE
Thanks for the reply

I've created a separate [issue](https://github.com/huggingface/datasets/issues/4982#issue-1375604693) for my problem.
2022-09-16T08:22:03Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1249069187
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5Kc0iD
https://api.github.com/repos/huggingface/datasets/issues/comments/1249069187/reactions
2022-09-16T08:22:03Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1249069187
https://avatars.githubusercontent.com/u/26695348?v=4
https://api.github.com/users/skalinin/events{/privacy}
https://api.github.com/users/skalinin/followers
https://api.github.com/users/skalinin/following{/other_user}
https://api.github.com/users/skalinin/gists{/gist_id}
https://github.com/skalinin
skalinin
MDQ6VXNlcjI2Njk1MzQ4
https://api.github.com/users/skalinin/orgs
https://api.github.com/users/skalinin/received_events
https://api.github.com/users/skalinin/repos
https://api.github.com/users/skalinin/starred{/owner}{/repo}
https://api.github.com/users/skalinin/subscriptions
User
https://api.github.com/users/skalinin
public
CONTRIBUTOR
> @polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if data_dir is specified (or if load_dataset(data_dir) is called)?

Sounds good to me! opened a PR: https://github.com/huggingface/datasets/pull/4985
2022-09-16T11:21:10Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1249243598
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5KdfHO
https://api.github.com/repos/huggingface/datasets/issues/comments/1249243598/reactions
2022-09-16T11:21:10Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1249243598
https://avatars.githubusercontent.com/u/16348744?v=4
https://api.github.com/users/polinaeterna/events{/privacy}
https://api.github.com/users/polinaeterna/followers
https://api.github.com/users/polinaeterna/following{/other_user}
https://api.github.com/users/polinaeterna/gists{/gist_id}
https://github.com/polinaeterna
polinaeterna
MDQ6VXNlcjE2MzQ4NzQ0
https://api.github.com/users/polinaeterna/orgs
https://api.github.com/users/polinaeterna/received_events
https://api.github.com/users/polinaeterna/repos
https://api.github.com/users/polinaeterna/starred{/owner}{/repo}
https://api.github.com/users/polinaeterna/subscriptions
User
https://api.github.com/users/polinaeterna
public
NONE
Hi there @polinaeterna @mariosasko ! I have installed 5.2.3.dev0, which should have this fix. Unfortunately, I am still getting the error:
`ValueError: Unknown split "validation". Should be one of ['train'].` When I call `load_dataset("csv", data_files=files, split=split)`

Any help would be greatly appreciated!
2022-10-06T16:55:40Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1270408030
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5LuONe
https://api.github.com/repos/huggingface/datasets/issues/comments/1270408030/reactions
2022-10-06T16:56:27Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1270408030
https://avatars.githubusercontent.com/u/33625326?v=4
https://api.github.com/users/shaneacton/events{/privacy}
https://api.github.com/users/shaneacton/followers
https://api.github.com/users/shaneacton/following{/other_user}
https://api.github.com/users/shaneacton/gists{/gist_id}
https://github.com/shaneacton
shaneacton
MDQ6VXNlcjMzNjI1MzI2
https://api.github.com/users/shaneacton/orgs
https://api.github.com/users/shaneacton/received_events
https://api.github.com/users/shaneacton/repos
https://api.github.com/users/shaneacton/starred{/owner}{/repo}
https://api.github.com/users/shaneacton/subscriptions
User
https://api.github.com/users/shaneacton
public
CONTRIBUTOR
hi @shaneacton ! could you please show your dataset structure?
2022-10-06T16:58:54Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1270411540
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5LuPEU
https://api.github.com/repos/huggingface/datasets/issues/comments/1270411540/reactions
2022-10-06T16:58:54Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1270411540
https://avatars.githubusercontent.com/u/16348744?v=4
https://api.github.com/users/polinaeterna/events{/privacy}
https://api.github.com/users/polinaeterna/followers
https://api.github.com/users/polinaeterna/following{/other_user}
https://api.github.com/users/polinaeterna/gists{/gist_id}
https://github.com/polinaeterna
polinaeterna
MDQ6VXNlcjE2MzQ4NzQ0
https://api.github.com/users/polinaeterna/orgs
https://api.github.com/users/polinaeterna/received_events
https://api.github.com/users/polinaeterna/repos
https://api.github.com/users/polinaeterna/starred{/owner}{/repo}
https://api.github.com/users/polinaeterna/subscriptions
User
https://api.github.com/users/polinaeterna
public
NONE
Hi there @polinaeterna . My local CSV files are stored as follows:
binding:
---------- tune.csv
---------- public_data:
--------------------------- train.csv

`self.list_shards(split)` sucessfully finds the relevant data files
2022-10-06T17:02:51Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1270415955
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5LuQJT
https://api.github.com/repos/huggingface/datasets/issues/comments/1270415955/reactions
2022-10-06T17:03:57Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1270415955
https://avatars.githubusercontent.com/u/33625326?v=4
https://api.github.com/users/shaneacton/events{/privacy}
https://api.github.com/users/shaneacton/followers
https://api.github.com/users/shaneacton/following{/other_user}
https://api.github.com/users/shaneacton/gists{/gist_id}
https://github.com/shaneacton
shaneacton
MDQ6VXNlcjMzNjI1MzI2
https://api.github.com/users/shaneacton/orgs
https://api.github.com/users/shaneacton/received_events
https://api.github.com/users/shaneacton/repos
https://api.github.com/users/shaneacton/starred{/owner}{/repo}
https://api.github.com/users/shaneacton/subscriptions
User
https://api.github.com/users/shaneacton
public
CONTRIBUTOR
@shaneacton do you have `validation.csv`/`val.csv`/`valid.csv`/`dev.csv` file in your data folder? I can't find it in the structure you provided
2022-10-06T17:09:18Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1270422730
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5LuRzK
https://api.github.com/repos/huggingface/datasets/issues/comments/1270422730/reactions
2022-10-06T17:09:18Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1270422730
https://avatars.githubusercontent.com/u/16348744?v=4
https://api.github.com/users/polinaeterna/events{/privacy}
https://api.github.com/users/polinaeterna/followers
https://api.github.com/users/polinaeterna/following{/other_user}
https://api.github.com/users/polinaeterna/gists{/gist_id}
https://github.com/polinaeterna
polinaeterna
MDQ6VXNlcjE2MzQ4NzQ0
https://api.github.com/users/polinaeterna/orgs
https://api.github.com/users/polinaeterna/received_events
https://api.github.com/users/polinaeterna/repos
https://api.github.com/users/polinaeterna/starred{/owner}{/repo}
https://api.github.com/users/polinaeterna/subscriptions
User
https://api.github.com/users/polinaeterna
public
NONE
@polinaeterna no, does the name of the split need to match the name of the file exactly?

But my train file is not actually named 'train.py' its called 'XXXXXXXXX_train_XXXXXXXX.csv'
And the code works fine for train, but fails for validation.
Does the file name need to _contain_ the split name?
2022-10-06T17:10:18Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1270423773
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5LuSDd
https://api.github.com/repos/huggingface/datasets/issues/comments/1270423773/reactions
2022-10-06T17:11:50Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1270423773
https://avatars.githubusercontent.com/u/33625326?v=4
https://api.github.com/users/shaneacton/events{/privacy}
https://api.github.com/users/shaneacton/followers
https://api.github.com/users/shaneacton/following{/other_user}
https://api.github.com/users/shaneacton/gists{/gist_id}
https://github.com/shaneacton
shaneacton
MDQ6VXNlcjMzNjI1MzI2
https://api.github.com/users/shaneacton/orgs
https://api.github.com/users/shaneacton/received_events
https://api.github.com/users/shaneacton/repos
https://api.github.com/users/shaneacton/starred{/owner}{/repo}
https://api.github.com/users/shaneacton/subscriptions
User
https://api.github.com/users/shaneacton
public
CONTRIBUTOR
@shaneacton what files do you expect to be included in "validation" split? yes, you should somehow indicate that a file belongs to a certain split - either by including split name in a filename or by putting it into a folder with split name, you can also check out [this documentation page](https://huggingface.co/docs/datasets/main/en/repository_structure) :)
by default all the data goes to a single `train` split
2022-10-06T17:25:02Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1270440739
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5LuWMj
https://api.github.com/repos/huggingface/datasets/issues/comments/1270440739/reactions
2022-10-06T17:25:02Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1270440739
https://avatars.githubusercontent.com/u/16348744?v=4
https://api.github.com/users/polinaeterna/events{/privacy}
https://api.github.com/users/polinaeterna/followers
https://api.github.com/users/polinaeterna/following{/other_user}
https://api.github.com/users/polinaeterna/gists{/gist_id}
https://github.com/polinaeterna
polinaeterna
MDQ6VXNlcjE2MzQ4NzQ0
https://api.github.com/users/polinaeterna/orgs
https://api.github.com/users/polinaeterna/received_events
https://api.github.com/users/polinaeterna/repos
https://api.github.com/users/polinaeterna/starred{/owner}{/repo}
https://api.github.com/users/polinaeterna/subscriptions
User
https://api.github.com/users/polinaeterna
public
NONE
@polinaeterna I have specified my train/test/tune files via the `split_to_filepattern` argument when initialising my `FileDataSource` class.  This is how `list_shards` is able to find the right files.
After your last message, I have tried renaminig my data files to simply `train.csv` and `validation.csv`, however I am still getting the same error: `Unknown split "validation". Should be one of ['train']`
2022-10-06T17:36:12Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1270452855
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5LuZJ3
https://api.github.com/repos/huggingface/datasets/issues/comments/1270452855/reactions
2022-10-06T17:36:12Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1270452855
https://avatars.githubusercontent.com/u/33625326?v=4
https://api.github.com/users/shaneacton/events{/privacy}
https://api.github.com/users/shaneacton/followers
https://api.github.com/users/shaneacton/following{/other_user}
https://api.github.com/users/shaneacton/gists{/gist_id}
https://github.com/shaneacton
shaneacton
MDQ6VXNlcjMzNjI1MzI2
https://api.github.com/users/shaneacton/orgs
https://api.github.com/users/shaneacton/received_events
https://api.github.com/users/shaneacton/repos
https://api.github.com/users/shaneacton/starred{/owner}{/repo}
https://api.github.com/users/shaneacton/subscriptions
User
https://api.github.com/users/shaneacton
public
NONE
@polinaeterna I have solved the issue. The solution was to call:
`load_dataset("csv", data_files={split: files}, split=split)`
2022-10-06T17:49:28Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-1270466840
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps5LuckY
https://api.github.com/repos/huggingface/datasets/issues/comments/1270466840/reactions
2022-10-06T17:49:28Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1270466840
https://avatars.githubusercontent.com/u/33625326?v=4
https://api.github.com/users/shaneacton/events{/privacy}
https://api.github.com/users/shaneacton/followers
https://api.github.com/users/shaneacton/following{/other_user}
https://api.github.com/users/shaneacton/gists{/gist_id}
https://github.com/shaneacton
shaneacton
MDQ6VXNlcjMzNjI1MzI2
https://api.github.com/users/shaneacton/orgs
https://api.github.com/users/shaneacton/received_events
https://api.github.com/users/shaneacton/repos
https://api.github.com/users/shaneacton/starred{/owner}{/repo}
https://api.github.com/users/shaneacton/subscriptions
User
https://api.github.com/users/shaneacton
public
NONE
For me it resolved by adding the verification_mode param:
```
  imdb_ds = load_dataset(
      "imdb", verification_mode="no_checks"
  )
  imdb_ds
```
2024-03-26T16:47:34Z
https://github.com/huggingface/datasets/issues/4895#issuecomment-2020965680
https://api.github.com/repos/huggingface/datasets/issues/4895
IC_kwDODunzps54dX0w
https://api.github.com/repos/huggingface/datasets/issues/comments/2020965680/reactions
2024-03-26T16:47:48Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2020965680
https://avatars.githubusercontent.com/u/10367311?v=4
https://api.github.com/users/mehran66/events{/privacy}
https://api.github.com/users/mehran66/followers
https://api.github.com/users/mehran66/following{/other_user}
https://api.github.com/users/mehran66/gists{/gist_id}
https://github.com/mehran66
mehran66
MDQ6VXNlcjEwMzY3MzEx
https://api.github.com/users/mehran66/orgs
https://api.github.com/users/mehran66/received_events
https://api.github.com/users/mehran66/repos
https://api.github.com/users/mehran66/starred{/owner}{/repo}
https://api.github.com/users/mehran66/subscriptions
User
https://api.github.com/users/mehran66
public
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.

The data directories are as follows and attached to this issue:
```
test_data1
              |_ train
                  |_ 1012.png
                  |_ metadata.jsonl
                  ...
              |_ test
                  ...
              |_ validation
                  |_ 234.png
                  |_ metadata.jsonl
                  ...
test_data2
              |_ train
                  |_ train_1012.png
                  |_ metadata.jsonl
                  ...
              |_ test
                  ...
              |_ validation
                  |_ val_234.png
                  |_ metadata.jsonl
                  ...
```

They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in  `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`

I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?

## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names


# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")

dataset_list = []
for spt in ["train", "test", "validation"]:
    dataset = load_dataset(path, split=spt)
    dataset_list.append(dataset)


# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")

dataset_list = []
for spt in ["train", "test", "validation"]:
    dataset = load_dataset(path, split=spt)
    dataset_list.append(dataset)
```


## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```

## Actual results
```
Traceback (most recent call last):
  File "test_data_loader.py", line 11, in <module>

    dataset = load_dataset(path, split=spt)
  File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
    ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
  File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
    datasets = map_nested(
  File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
    return function(data_struct)
  File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
    ds = self._as_dataset(
  File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
    dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
  File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
    files = self.get_file_instructions(name, instructions, split_infos)
  File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
    file_instructions = make_file_instructions(
  File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
    absolute_instructions = instruction.to_absolute(name2len)
  File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
    return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
  File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
    return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
  File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
    raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```

## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0

Data files

[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)

