Document the HF_DATASETS_CACHE environment variable in the datasets cache documentation
NONE
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_7532). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
2025-04-28T11:33:11Z
https://github.com/huggingface/datasets/pull/7532#issuecomment-2834951866
https://api.github.com/repos/huggingface/datasets/issues/7532
IC_kwDODunzps6o-e66
https://api.github.com/repos/huggingface/datasets/issues/comments/2834951866/reactions
2025-04-28T11:33:11Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2834951866
https://avatars.githubusercontent.com/u/99929124?v=4
https://api.github.com/users/HuggingFaceDocBuilderDev/events{/privacy}
https://api.github.com/users/HuggingFaceDocBuilderDev/followers
https://api.github.com/users/HuggingFaceDocBuilderDev/following{/other_user}
https://api.github.com/users/HuggingFaceDocBuilderDev/gists{/gist_id}
https://github.com/HuggingFaceDocBuilderDev
HuggingFaceDocBuilderDev
U_kgDOBfTMJA
https://api.github.com/users/HuggingFaceDocBuilderDev/orgs
https://api.github.com/users/HuggingFaceDocBuilderDev/received_events
https://api.github.com/users/HuggingFaceDocBuilderDev/repos
https://api.github.com/users/HuggingFaceDocBuilderDev/starred{/owner}{/repo}
https://api.github.com/users/HuggingFaceDocBuilderDev/subscriptions
User
https://api.github.com/users/HuggingFaceDocBuilderDev
public
MEMBER
Your clarification in your comment at https://github.com/huggingface/datasets/issues/7480#issuecomment-2833640084 sounds great, would you like to update this PR to include it ?
2025-04-28T13:04:49Z
https://github.com/huggingface/datasets/pull/7532#issuecomment-2835178188
https://api.github.com/repos/huggingface/datasets/issues/7532
IC_kwDODunzps6o_WLM
https://api.github.com/repos/huggingface/datasets/issues/comments/2835178188/reactions
2025-04-28T13:04:49Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2835178188
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 @lhoestq, I’ve updated the documentation to reflect the clarifications discussed in #7480. Let me know if anything else is needed!

2025-05-06T14:46:14Z
https://github.com/huggingface/datasets/pull/7532#issuecomment-2854849053
https://api.github.com/repos/huggingface/datasets/issues/7532
IC_kwDODunzps6qKYod
https://api.github.com/repos/huggingface/datasets/issues/comments/2854849053/reactions
2025-05-06T14:46:14Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2854849053
https://avatars.githubusercontent.com/u/129883215?v=4
https://api.github.com/users/Harry-Yang0518/events{/privacy}
https://api.github.com/users/Harry-Yang0518/followers
https://api.github.com/users/Harry-Yang0518/following{/other_user}
https://api.github.com/users/Harry-Yang0518/gists{/gist_id}
https://github.com/Harry-Yang0518
Harry-Yang0518
U_kgDOB73cTw
https://api.github.com/users/Harry-Yang0518/orgs
https://api.github.com/users/Harry-Yang0518/received_events
https://api.github.com/users/Harry-Yang0518/repos
https://api.github.com/users/Harry-Yang0518/starred{/owner}{/repo}
https://api.github.com/users/Harry-Yang0518/subscriptions
User
https://api.github.com/users/Harry-Yang0518
public

This pull request updates the Datasets documentation to include the `HF_DATASETS_CACHE` environment variable. While the current documentation only mentions `HF_HOME` for overriding the default cache directory, `HF_DATASETS_CACHE` is also a supported and useful option for specifying a custom cache location for datasets stored in Arrow format.

This addition is based on the discussion in (https://github.com/huggingface/datasets/issues/7457), where users noted the absence of this variable in the documentation despite its functionality. The update adds a new section to `cache.mdx` that explains how to use `HF_DATASETS_CACHE` with an example.

This change aims to improve clarity and help users better manage their cache directories when working in shared environments or with limited local storage.

Closes #7457.