load_dataset() function's cache_dir does not seems to work
COLLABORATOR
Can you share the error message?

Also, it would help if you could check whether `huggingface_hub`'s download behaves the same:
```python
from huggingface_hub import snapshot_download
snapshot_download("trec", repo_type="dataset", cache_dir='/path/to/my/dir)
```

In the next major release, we aim to switch to `huggingface_hub` for file download/caching, but we could align the `cache_dir`'s `umask` behavior earlier than this if their solution works for your use case.
2023-09-27T13:40:45Z
https://github.com/huggingface/datasets/issues/6256#issuecomment-1737424073
https://api.github.com/repos/huggingface/datasets/issues/6256
IC_kwDODunzps5njvzJ
https://api.github.com/repos/huggingface/datasets/issues/comments/1737424073/reactions
2023-09-27T13:40:45Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1737424073
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
@mariosasko, Hey , is there any update on this? 
2024-09-17T17:01:03Z
https://github.com/huggingface/datasets/issues/6256#issuecomment-2356454678
https://api.github.com/repos/huggingface/datasets/issues/6256
IC_kwDODunzps6MdKUW
https://api.github.com/repos/huggingface/datasets/issues/comments/2356454678/reactions
2024-09-17T17:01:03Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2356454678
https://avatars.githubusercontent.com/u/174366614?v=4
https://api.github.com/users/srinjoym-cerebras/events{/privacy}
https://api.github.com/users/srinjoym-cerebras/followers
https://api.github.com/users/srinjoym-cerebras/following{/other_user}
https://api.github.com/users/srinjoym-cerebras/gists{/gist_id}
https://github.com/srinjoym-cerebras
srinjoym-cerebras
U_kgDOCmSflg
https://api.github.com/users/srinjoym-cerebras/orgs
https://api.github.com/users/srinjoym-cerebras/received_events
https://api.github.com/users/srinjoym-cerebras/repos
https://api.github.com/users/srinjoym-cerebras/starred{/owner}{/repo}
https://api.github.com/users/srinjoym-cerebras/subscriptions
User
https://api.github.com/users/srinjoym-cerebras
public
NONE
Yes, I am still facing the same issue.

```python
from huggingface_hub import snapshot_download
snapshot_download("trec", repo_type="dataset", cache_dir='/path/to/my/dir)
```

But this is working for me.

Thanks.
2024-09-17T18:19:04Z
https://github.com/huggingface/datasets/issues/6256#issuecomment-2356606630
https://api.github.com/repos/huggingface/datasets/issues/6256
IC_kwDODunzps6Mdvam
https://api.github.com/repos/huggingface/datasets/issues/comments/2356606630/reactions
2024-09-17T18:29:24Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2356606630
https://avatars.githubusercontent.com/u/34067296?v=4
https://api.github.com/users/Dipeshtamboli/events{/privacy}
https://api.github.com/users/Dipeshtamboli/followers
https://api.github.com/users/Dipeshtamboli/following{/other_user}
https://api.github.com/users/Dipeshtamboli/gists{/gist_id}
https://github.com/Dipeshtamboli
Dipeshtamboli
MDQ6VXNlcjM0MDY3Mjk2
https://api.github.com/users/Dipeshtamboli/orgs
https://api.github.com/users/Dipeshtamboli/received_events
https://api.github.com/users/Dipeshtamboli/repos
https://api.github.com/users/Dipeshtamboli/starred{/owner}{/repo}
https://api.github.com/users/Dipeshtamboli/subscriptions
User
https://api.github.com/users/Dipeshtamboli
public
NONE
Could you clarify a bit? What if I wanted only 100 samples from train split, how would i change the above? Thanks
2024-09-18T10:10:10Z
https://github.com/huggingface/datasets/issues/6256#issuecomment-2358056107
https://api.github.com/repos/huggingface/datasets/issues/6256
IC_kwDODunzps6MjRSr
https://api.github.com/repos/huggingface/datasets/issues/comments/2358056107/reactions
2024-09-18T10:10:10Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2358056107
https://avatars.githubusercontent.com/u/174366614?v=4
https://api.github.com/users/srinjoym-cerebras/events{/privacy}
https://api.github.com/users/srinjoym-cerebras/followers
https://api.github.com/users/srinjoym-cerebras/following{/other_user}
https://api.github.com/users/srinjoym-cerebras/gists{/gist_id}
https://github.com/srinjoym-cerebras
srinjoym-cerebras
U_kgDOCmSflg
https://api.github.com/users/srinjoym-cerebras/orgs
https://api.github.com/users/srinjoym-cerebras/received_events
https://api.github.com/users/srinjoym-cerebras/repos
https://api.github.com/users/srinjoym-cerebras/starred{/owner}{/repo}
https://api.github.com/users/srinjoym-cerebras/subscriptions
User
https://api.github.com/users/srinjoym-cerebras
public
CONTRIBUTOR
I have exactly same issue
2024-10-05T11:34:29Z
https://github.com/huggingface/datasets/issues/6256#issuecomment-2395027086
https://api.github.com/repos/huggingface/datasets/issues/6256
IC_kwDODunzps6OwTaO
https://api.github.com/repos/huggingface/datasets/issues/comments/2395027086/reactions
2024-10-05T11:34:29Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2395027086
https://avatars.githubusercontent.com/u/989899?v=4
https://api.github.com/users/torotoki/events{/privacy}
https://api.github.com/users/torotoki/followers
https://api.github.com/users/torotoki/following{/other_user}
https://api.github.com/users/torotoki/gists{/gist_id}
https://github.com/torotoki
torotoki
MDQ6VXNlcjk4OTg5OQ==
https://api.github.com/users/torotoki/orgs
https://api.github.com/users/torotoki/received_events
https://api.github.com/users/torotoki/repos
https://api.github.com/users/torotoki/starred{/owner}{/repo}
https://api.github.com/users/torotoki/subscriptions
User
https://api.github.com/users/torotoki
public
NONE
@lhoestq Can this be open again? Reading #7200 this doesn't even address not being able to specify `cache_dir`, it just updates the documentation? Their own comment states this:

> In my testing, I could not specify the cache directory even by load_dataset("dataset_name" cache_dir="..."). It might be another issue. I also welcome any advice to solve this issue.

Nothing else in the PR seems to indicate that this is actually resolved.
2025-05-12T20:20:29Z
https://github.com/huggingface/datasets/issues/6256#issuecomment-2873876583
https://api.github.com/repos/huggingface/datasets/issues/6256
IC_kwDODunzps6rS-Bn
https://api.github.com/repos/huggingface/datasets/issues/comments/2873876583/reactions
2025-05-12T20:22:08Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2873876583
https://avatars.githubusercontent.com/u/47208251?v=4
https://api.github.com/users/mitchelldehaven/events{/privacy}
https://api.github.com/users/mitchelldehaven/followers
https://api.github.com/users/mitchelldehaven/following{/other_user}
https://api.github.com/users/mitchelldehaven/gists{/gist_id}
https://github.com/mitchelldehaven
mitchelldehaven
MDQ6VXNlcjQ3MjA4MjUx
https://api.github.com/users/mitchelldehaven/orgs
https://api.github.com/users/mitchelldehaven/received_events
https://api.github.com/users/mitchelldehaven/repos
https://api.github.com/users/mitchelldehaven/starred{/owner}{/repo}
https://api.github.com/users/mitchelldehaven/subscriptions
User
https://api.github.com/users/mitchelldehaven
public
NONE
I've noticed the same issue. Looks like #7499 was fixing it, but from what I see in the comments this setting is for different caches?
2025-05-13T22:22:34Z
https://github.com/huggingface/datasets/issues/6256#issuecomment-2878095108
https://api.github.com/repos/huggingface/datasets/issues/6256
IC_kwDODunzps6rjD8E
https://api.github.com/repos/huggingface/datasets/issues/comments/2878095108/reactions
2025-05-13T22:24:08Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2878095108
https://avatars.githubusercontent.com/u/1215605?v=4
https://api.github.com/users/mciancia/events{/privacy}
https://api.github.com/users/mciancia/followers
https://api.github.com/users/mciancia/following{/other_user}
https://api.github.com/users/mciancia/gists{/gist_id}
https://github.com/mciancia
mciancia
MDQ6VXNlcjEyMTU2MDU=
https://api.github.com/users/mciancia/orgs
https://api.github.com/users/mciancia/received_events
https://api.github.com/users/mciancia/repos
https://api.github.com/users/mciancia/starred{/owner}{/repo}
https://api.github.com/users/mciancia/subscriptions
User
https://api.github.com/users/mciancia
public
MEMBER
Hi ! you can find the information about the `datasets` and `huggingface_hub` cache directories here: https://huggingface.co/docs/datasets/v3.6.0/en/cache#cache-directory
2025-05-14T10:08:52Z
https://github.com/huggingface/datasets/issues/6256#issuecomment-2879613485
https://api.github.com/repos/huggingface/datasets/issues/6256
IC_kwDODunzps6ro2ot
https://api.github.com/repos/huggingface/datasets/issues/comments/2879613485/reactions
2025-05-14T10:08:52Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2879613485
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
### Describe the bug

datasets version: 2.14.5

when trying to run the following command
trec = load_dataset('trec', split='train[:1000]', cache_dir='/path/to/my/dir')

I keep getting error saying the command does not have permission to the default cache directory on my macbook pro machine. 

It seems the cache_dir parameter cannot change the dataset saving directory from the default 

what ever explained in the https://huggingface.co/docs/datasets/cache does not seem to work


### Steps to reproduce the bug

datasets version: 2.14.5

when trying to run the following command
trec = load_dataset('trec', split='train[:1000]', cache_dir='/path/to/my/dir')

I keep getting error saying the command does not have permission to the default cache directory on my macbook pro machine. 

It seems the cache_dir parameter cannot change the dataset saving directory from the default 

what ever explained in the https://huggingface.co/docs/datasets/cache does not seem to work

### Expected behavior

the dataset should be saved to the cache_dir points to 

### Environment info

datasets version: 2.14.5
macos X: Ventura 13.4.1 (c)