Load a local cached dataset that has been modified
COLLABORATOR
Hi! `datasets` caches every modification/loading, so you can either rerun the pipeline up to the `map` call or use `Dataset.from_file(modified_dataset)` to load the dataset directly from the cache file.
2022-06-02T12:57:24Z
https://github.com/huggingface/datasets/issues/4435#issuecomment-1144832824
https://api.github.com/repos/huggingface/datasets/issues/4435
IC_kwDODunzps5EPMM4
https://api.github.com/repos/huggingface/datasets/issues/comments/1144832824/reactions
2022-06-02T12:57:24Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1144832824
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
Awesome, hvala Mario! This works. 
2022-06-02T23:59:10Z
https://github.com/huggingface/datasets/issues/4435#issuecomment-1145455598
https://api.github.com/repos/huggingface/datasets/issues/4435
IC_kwDODunzps5ERkPu
https://api.github.com/repos/huggingface/datasets/issues/comments/1145455598/reactions
2022-06-02T23:59:26Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1145455598
https://avatars.githubusercontent.com/u/2789441?v=4
https://api.github.com/users/mihail911/events{/privacy}
https://api.github.com/users/mihail911/followers
https://api.github.com/users/mihail911/following{/other_user}
https://api.github.com/users/mihail911/gists{/gist_id}
https://github.com/mihail911
mihail911
MDQ6VXNlcjI3ODk0NDE=
https://api.github.com/users/mihail911/orgs
https://api.github.com/users/mihail911/received_events
https://api.github.com/users/mihail911/repos
https://api.github.com/users/mihail911/starred{/owner}{/repo}
https://api.github.com/users/mihail911/subscriptions
User
https://api.github.com/users/mihail911
public
## Describe the bug
I have loaded a dataset as follows:
```
d = load_dataset("emotion", split="validation")
```
Afterwards I make some modifications to the dataset via a `map` call:
```
d.map(some_update_func, cache_file_name=modified_dataset)
```
This generates a cached version of the dataset on my local system in the same directory as the original download of the data (/path/to/cache). Running an `ls` returns:
```
modified_dataset
dataset_info.json  
emotion-test.arrow  
emotion-train.arrow  
emotion-validation.arrow
```
as expected. However, when I try to load up the modified cached dataset via a call to 
```
modified = load_dataset("emotion", split="validation", data_files="/path/to/cache/modified_dataset") 
```
it simply redownloads a new version of the dataset and dumps to a new cache rather than loading up the original modified dataset:
```
Using custom data configuration validation-cdbf51685638421b
Downloading and preparing dataset emotion/validation to ...
```

How am I supposed to load the original modified local cache copy of the dataset?

## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-113-generic-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2

