load_dataset can't load local dataset,Unable to find ...
MEMBER
Hi! :)

I believe that should work unless `dataset_infos.json` isn't actually a dataset. For Hugging Face datasets, there is usually a file named `dataset_infos.json` which contains metadata about the dataset (eg. the dataset citation, license, description, etc). Can you double-check that `dataset_infos.json` isn't just metadata please?
2022-04-21T21:29:28Z
https://github.com/huggingface/datasets/issues/4192#issuecomment-1105779550
https://api.github.com/repos/huggingface/datasets/issues/4192
IC_kwDODunzps5B6Nte
https://api.github.com/repos/huggingface/datasets/issues/comments/1105779550/reactions
2022-04-21T21:29:28Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1105779550
https://avatars.githubusercontent.com/u/59462357?v=4
https://api.github.com/users/stevhliu/events{/privacy}
https://api.github.com/users/stevhliu/followers
https://api.github.com/users/stevhliu/following{/other_user}
https://api.github.com/users/stevhliu/gists{/gist_id}
https://github.com/stevhliu
stevhliu
MDQ6VXNlcjU5NDYyMzU3
https://api.github.com/users/stevhliu/orgs
https://api.github.com/users/stevhliu/received_events
https://api.github.com/users/stevhliu/repos
https://api.github.com/users/stevhliu/starred{/owner}{/repo}
https://api.github.com/users/stevhliu/subscriptions
User
https://api.github.com/users/stevhliu
public
MEMBER
Hi @ahf876828330, 

As @stevhliu pointed out, the proper way to load a dataset is not trying to load its metadata file.

In your case, as the dataset script is local, you should better point to your local loading script:
```python
dataset = load_dataset("dataset/opus_books.py")
```

Please, feel free to re-open this issue if the previous code snippet does not work for you.
2022-04-22T07:39:53Z
https://github.com/huggingface/datasets/issues/4192#issuecomment-1106114149
https://api.github.com/repos/huggingface/datasets/issues/4192
IC_kwDODunzps5B7fZl
https://api.github.com/repos/huggingface/datasets/issues/comments/1106114149/reactions
2022-04-22T07:39:53Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1106114149
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
> Hi! :)
> 
> I believe that should work unless `dataset_infos.json` isn't actually a dataset. For Hugging Face datasets, there is usually a file named `dataset_infos.json` which contains metadata about the dataset (eg. the dataset citation, license, description, etc). Can you double-check that `dataset_infos.json` isn't just metadata please?

Yes，you are right!So if I have a metadata dataset local,How can I turn it to a dataset that can be used by the load_dataset() function？Are there some examples?
2022-04-23T08:56:29Z
https://github.com/huggingface/datasets/issues/4192#issuecomment-1107436624
https://api.github.com/repos/huggingface/datasets/issues/4192
IC_kwDODunzps5CAiRQ
https://api.github.com/repos/huggingface/datasets/issues/comments/1107436624/reactions
2022-04-23T08:56:29Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1107436624
https://avatars.githubusercontent.com/u/33253979?v=4
https://api.github.com/users/ahf876828330/events{/privacy}
https://api.github.com/users/ahf876828330/followers
https://api.github.com/users/ahf876828330/following{/other_user}
https://api.github.com/users/ahf876828330/gists{/gist_id}
https://github.com/ahf876828330
ahf876828330
MDQ6VXNlcjMzMjUzOTc5
https://api.github.com/users/ahf876828330/orgs
https://api.github.com/users/ahf876828330/received_events
https://api.github.com/users/ahf876828330/repos
https://api.github.com/users/ahf876828330/starred{/owner}{/repo}
https://api.github.com/users/ahf876828330/subscriptions
User
https://api.github.com/users/ahf876828330
public
MEMBER
The metadata file isn't a dataset so you can't turn it into one. You should try @albertvillanova's code snippet above (now merged in the docs [here](https://huggingface.co/docs/datasets/master/en/loading#local-loading-script)), which uses your local loading script `opus_books.py` to:

1. Download the actual dataset. 
2. Once the dataset is downloaded, `load_dataset` will load it for you.
2022-04-25T16:51:57Z
https://github.com/huggingface/datasets/issues/4192#issuecomment-1108810640
https://api.github.com/repos/huggingface/datasets/issues/4192
IC_kwDODunzps5CFxuQ
https://api.github.com/repos/huggingface/datasets/issues/comments/1108810640/reactions
2022-04-25T16:51:57Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1108810640
https://avatars.githubusercontent.com/u/59462357?v=4
https://api.github.com/users/stevhliu/events{/privacy}
https://api.github.com/users/stevhliu/followers
https://api.github.com/users/stevhliu/following{/other_user}
https://api.github.com/users/stevhliu/gists{/gist_id}
https://github.com/stevhliu
stevhliu
MDQ6VXNlcjU5NDYyMzU3
https://api.github.com/users/stevhliu/orgs
https://api.github.com/users/stevhliu/received_events
https://api.github.com/users/stevhliu/repos
https://api.github.com/users/stevhliu/starred{/owner}{/repo}
https://api.github.com/users/stevhliu/subscriptions
User
https://api.github.com/users/stevhliu
public

Traceback (most recent call last):
  File "/home/gs603/ahf/pretrained/model.py", line 48, in <module>
    dataset = load_dataset("json",data_files="dataset/dataset_infos.json")
  File "/home/gs603/miniconda3/envs/coderepair/lib/python3.7/site-packages/datasets/load.py", line 1675, in load_dataset
    **config_kwargs,
  File "/home/gs603/miniconda3/envs/coderepair/lib/python3.7/site-packages/datasets/load.py", line 1496, in load_dataset_builder
    data_files=data_files,
  File "/home/gs603/miniconda3/envs/coderepair/lib/python3.7/site-packages/datasets/load.py", line 1155, in dataset_module_factory
    download_mode=download_mode,
  File "/home/gs603/miniconda3/envs/coderepair/lib/python3.7/site-packages/datasets/load.py", line 800, in get_module
    data_files = DataFilesDict.from_local_or_remote(patterns, use_auth_token=self.downnload_config.use_auth_token)
  File "/home/gs603/miniconda3/envs/coderepair/lib/python3.7/site-packages/datasets/data_files.py", line 582, in from_local_or_remote
    if not isinstance(patterns_for_key, DataFilesList)
  File "/home/gs603/miniconda3/envs/coderepair/lib/python3.7/site-packages/datasets/data_files.py", line 544, in from_local_or_remote
    data_files = resolve_patterns_locally_or_by_urls(base_path, patterns, allowed_extensions)
  File "/home/gs603/miniconda3/envs/coderepair/lib/python3.7/site-packages/datasets/data_files.py", line 194, in resolve_patterns_locally_or_by_urls
    for path in _resolve_single_pattern_locally(base_path, pattern, allowed_extensions):
  File "/home/gs603/miniconda3/envs/coderepair/lib/python3.7/site-packages/datasets/data_files.py", line 144, in _resolve_single_pattern_locally
    raise FileNotFoundError(error_msg)
FileNotFoundError: Unable to find '/home/gs603/ahf/pretrained/dataset/dataset_infos.json' at /home/gs603/ahf/pretrained


![image](https://user-images.githubusercontent.com/33253979/164413285-84ea65ac-9126-408f-9cd2-ce4751a5dd73.png)
![image](https://user-images.githubusercontent.com/33253979/164413338-4735142f-408b-41d9-ab87-8484de2be54f.png)

the code is in the model.py,why I can't use the load_dataset function to load my local dataset?