Cannot use cached dataset without Internet connection (or when servers are down)
NONE
There are 2 workarounds, tho:
1. Download datasets from web and just load them locally
2. Use metadata directly (temporal solution, since metadata can change)
```
import datasets
from datasets.data_files import DataFilesDict, DataFilesList

data_files_list = DataFilesList(
    [
        "hf://datasets/allenai/c4@1588ec454efa1a09f29cd18ddd04fe05fc8653a2/en/c4-train.00000-of-01024.json.gz"
    ],
    [("allenai/c4", "1588ec454efa1a09f29cd18ddd04fe05fc8653a2")],
)
data_files = DataFilesDict({"train": data_files_list})
c4_dataset = datasets.load_dataset(
    path="allenai/c4",
    data_files=data_files,
    split="train",
    cache_dir="/datesets/cache",
    download_mode="reuse_cache_if_exists",
    token=False,
)
```
Second solution also shows where to find the bug. I suggest that the hashing functions should always use only original parameter `data_files`, and not the one they get after connecting to the server and creating `DataFilesDict`
2024-04-25T10:59:46Z
https://github.com/huggingface/datasets/issues/6837#issuecomment-2076917082
https://api.github.com/repos/huggingface/datasets/issues/6837
IC_kwDODunzps57yz1a
https://api.github.com/repos/huggingface/datasets/issues/comments/2076917082/reactions
2024-04-25T10:59:46Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2076917082
https://avatars.githubusercontent.com/u/112088378?v=4
https://api.github.com/users/DionisMuzenitov/events{/privacy}
https://api.github.com/users/DionisMuzenitov/followers
https://api.github.com/users/DionisMuzenitov/following{/other_user}
https://api.github.com/users/DionisMuzenitov/gists{/gist_id}
https://github.com/DionisMuzenitov
DionisMuzenitov
U_kgDOBq5VOg
https://api.github.com/users/DionisMuzenitov/orgs
https://api.github.com/users/DionisMuzenitov/received_events
https://api.github.com/users/DionisMuzenitov/repos
https://api.github.com/users/DionisMuzenitov/starred{/owner}{/repo}
https://api.github.com/users/DionisMuzenitov/subscriptions
User
https://api.github.com/users/DionisMuzenitov
public
COLLABORATOR
Hi! You need to set the `HF_DATASETS_OFFLINE` env variable to `1` to load cached datasets offline, as explained in the docs [here](https://huggingface.co/docs/datasets/v2.19.0/en/loading#offline).
2024-04-26T13:43:34Z
https://github.com/huggingface/datasets/issues/6837#issuecomment-2079425826
https://api.github.com/repos/huggingface/datasets/issues/6837
IC_kwDODunzps578YUi
https://api.github.com/repos/huggingface/datasets/issues/comments/2079425826/reactions
2024-04-26T13:43:34Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2079425826
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
Just tested. It doesn't work, because of the exact problem I described above: hash of dataset config is different.
The only error difference is the reason why it cannot connect to HuggingFace (now it's 'offline mode is enabled')
![image](https://github.com/huggingface/datasets/assets/112088378/1a7e1720-d711-46e3-9c90-53d52c441e68)

2024-04-26T14:26:47Z
https://github.com/huggingface/datasets/issues/6837#issuecomment-2079504280
https://api.github.com/repos/huggingface/datasets/issues/6837
IC_kwDODunzps578reY
https://api.github.com/repos/huggingface/datasets/issues/comments/2079504280/reactions
2024-04-26T14:27:15Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2079504280
https://avatars.githubusercontent.com/u/112088378?v=4
https://api.github.com/users/DionisMuzenitov/events{/privacy}
https://api.github.com/users/DionisMuzenitov/followers
https://api.github.com/users/DionisMuzenitov/following{/other_user}
https://api.github.com/users/DionisMuzenitov/gists{/gist_id}
https://github.com/DionisMuzenitov
DionisMuzenitov
U_kgDOBq5VOg
https://api.github.com/users/DionisMuzenitov/orgs
https://api.github.com/users/DionisMuzenitov/received_events
https://api.github.com/users/DionisMuzenitov/repos
https://api.github.com/users/DionisMuzenitov/starred{/owner}{/repo}
https://api.github.com/users/DionisMuzenitov/subscriptions
User
https://api.github.com/users/DionisMuzenitov
public
NONE
Met a pretty similar issue here, as I manually load the dataset into ~/.cache and try to let `load_dataset` detect it automatically, but it will always try reach hub even I set `HF_DATASETS_OFFLINE` to 1. Have you solved it? 
2024-07-19T08:06:52Z
https://github.com/huggingface/datasets/issues/6837#issuecomment-2238604162
https://api.github.com/repos/huggingface/datasets/issues/6837
IC_kwDODunzps6FbmOC
https://api.github.com/repos/huggingface/datasets/issues/comments/2238604162/reactions
2024-07-19T08:06:52Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2238604162
https://avatars.githubusercontent.com/u/79906168?v=4
https://api.github.com/users/ErikaaWang/events{/privacy}
https://api.github.com/users/ErikaaWang/followers
https://api.github.com/users/ErikaaWang/following{/other_user}
https://api.github.com/users/ErikaaWang/gists{/gist_id}
https://github.com/ErikaaWang
ErikaaWang
MDQ6VXNlcjc5OTA2MTY4
https://api.github.com/users/ErikaaWang/orgs
https://api.github.com/users/ErikaaWang/received_events
https://api.github.com/users/ErikaaWang/repos
https://api.github.com/users/ErikaaWang/starred{/owner}{/repo}
https://api.github.com/users/ErikaaWang/subscriptions
User
https://api.github.com/users/ErikaaWang
public
NONE
same here!
2024-10-20T12:36:54Z
https://github.com/huggingface/datasets/issues/6837#issuecomment-2424906779
https://api.github.com/repos/huggingface/datasets/issues/6837
IC_kwDODunzps6QiSQb
https://api.github.com/repos/huggingface/datasets/issues/comments/2424906779/reactions
2024-10-20T12:36:54Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2424906779
https://avatars.githubusercontent.com/u/50308536?v=4
https://api.github.com/users/zjwu0522/events{/privacy}
https://api.github.com/users/zjwu0522/followers
https://api.github.com/users/zjwu0522/following{/other_user}
https://api.github.com/users/zjwu0522/gists{/gist_id}
https://github.com/zjwu0522
zjwu0522
MDQ6VXNlcjUwMzA4NTM2
https://api.github.com/users/zjwu0522/orgs
https://api.github.com/users/zjwu0522/received_events
https://api.github.com/users/zjwu0522/repos
https://api.github.com/users/zjwu0522/starred{/owner}{/repo}
https://api.github.com/users/zjwu0522/subscriptions
User
https://api.github.com/users/zjwu0522
public
NONE
Same issue here, my case is that I need to download the dataset from the login node and run the jobs on the compute node in which the internet is inaccessible, however, the `load_dataset()` function would always lead to sending requests and tries to connect, although I have downloaded the dataset using the same `load_dataset()` function previously. While I believe the `model.from_pretrained()` function is designed to be quite effective as it could always force the reuse of the pre-downloaded weights by using `local_files_only = True`, however, there is no such entry for us to set `local_files_only = True` for `load_dataset()` function.
2025-01-25T16:36:40Z
https://github.com/huggingface/datasets/issues/6837#issuecomment-2614024035
https://api.github.com/repos/huggingface/datasets/issues/6837
IC_kwDODunzps6bztdj
https://api.github.com/repos/huggingface/datasets/issues/comments/2614024035/reactions
2025-01-25T16:36:40Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2614024035
https://avatars.githubusercontent.com/u/41854373?v=4
https://api.github.com/users/ZichengDuan/events{/privacy}
https://api.github.com/users/ZichengDuan/followers
https://api.github.com/users/ZichengDuan/following{/other_user}
https://api.github.com/users/ZichengDuan/gists{/gist_id}
https://github.com/ZichengDuan
ZichengDuan
MDQ6VXNlcjQxODU0Mzcz
https://api.github.com/users/ZichengDuan/orgs
https://api.github.com/users/ZichengDuan/received_events
https://api.github.com/users/ZichengDuan/repos
https://api.github.com/users/ZichengDuan/starred{/owner}{/repo}
https://api.github.com/users/ZichengDuan/subscriptions
User
https://api.github.com/users/ZichengDuan
public
### Describe the bug

I want to be able to use cached dataset from HuggingFace even when I have no Internet connection (or when HuggingFace servers are down, or my company has network issues).  
The problem why I can't use it:
`data_files` argument from `datasets.load_dataset()` function get it updates from the server before calculating hash for caching. As a result, when I run the same code with and without Internet I get different dataset configuration directory name.

### Steps to reproduce the bug

```
import datasets

c4_dataset = datasets.load_dataset(
    path="allenai/c4",
    data_files={"train": "en/c4-train.00000-of-01024.json.gz"},
    split="train",
    cache_dir="/datesets/cache",
    download_mode="reuse_cache_if_exists",
    token=False,
)
```
1. Run this code with the Internet.
2. Run the same code without the Internet.

### Expected behavior

When running without the Internet connection, the loader should be able to get dataset from cache

### Environment info

- `datasets` version: 2.19.0
- Platform: Windows-10-10.0.19044-SP0
- Python version: 3.10.13
- `huggingface_hub` version: 0.22.2
- PyArrow version: 16.0.0
- Pandas version: 1.5.3
- `fsspec` version: 2023.12.2