split cache used when processing different split
MEMBER
I was not able to reproduce this behavior (I tried without using pytorch lightning though, since I don't know what code you ran in pytorch lightning to get this).

If you can provide a MWE that would be perfect ! :)
2022-06-28T13:57:52Z
https://github.com/huggingface/datasets/issues/4526#issuecomment-1168762965
https://api.github.com/repos/huggingface/datasets/issues/4526
IC_kwDODunzps5FqehV
https://api.github.com/repos/huggingface/datasets/issues/comments/1168762965/reactions
2022-06-28T13:58:12Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1168762965
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
CONTRIBUTOR
Hi, I think the issue happened because I was loading datasets under an `if` ... `else` statement and the condition would change the dataset I would need to load but instead the cached one was always returned. However, I believe that is expected behaviour, if so I'll close the issue.

Otherwise I will try to provide a MWE
2022-06-28T14:02:02Z
https://github.com/huggingface/datasets/issues/4526#issuecomment-1168768018
https://api.github.com/repos/huggingface/datasets/issues/4526
IC_kwDODunzps5FqfwS
https://api.github.com/repos/huggingface/datasets/issues/comments/1168768018/reactions
2022-06-28T14:04:58Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1168768018
https://avatars.githubusercontent.com/u/32967787?v=4
https://api.github.com/users/gpucce/events{/privacy}
https://api.github.com/users/gpucce/followers
https://api.github.com/users/gpucce/following{/other_user}
https://api.github.com/users/gpucce/gists{/gist_id}
https://github.com/gpucce
gpucce
MDQ6VXNlcjMyOTY3Nzg3
https://api.github.com/users/gpucce/orgs
https://api.github.com/users/gpucce/received_events
https://api.github.com/users/gpucce/repos
https://api.github.com/users/gpucce/starred{/owner}{/repo}
https://api.github.com/users/gpucce/subscriptions
User
https://api.github.com/users/gpucce
public
## Describe the bug`
```
ds1 = load_dataset('squad', split='validation')
ds2 = load_dataset('squad', split='train')
ds1 = ds1.map(some_function)
ds2 = ds2.map(some_function)
assert ds1 == ds2
```
This happens when ds1 and ds2 are created in `pytorch_lightning.DataModule` through

```
class myDataModule:

    def train_dataloader(self):
         ds = load_dataset('squad', split='train')
         ds = ds.map(some_function)
         return [ds]

    def val_dataloader(self):
         ds = load_dataset('squad', split="validation")
         ds = ds.map(some_function)
         return [ds]
```
I don't know if it depends on `pytorch_lightning` or `datasets` but setting `ds.map(some_function, load_from_cache_file=False)` fixes the issue.

If this is not enough to replicate I will try and provide and MWE, I don't have time now so I thought I wuld open the issue first!