Skip to content

Document the HF_DATASETS_CACHE environment variable in the datasets cache documentation #7532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/source/cache.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ The default 🤗 Datasets cache directory is `~/.cache/huggingface/datasets`. Ch

```
$ export HF_HOME="/path/to/another/directory/datasets"

```
## HF_DATASETS_CACHE

In addition to using `HF_HOME`, you can override the default 🤗 Datasets cache directory by setting the `HF_DATASETS_CACHE` environment variable. This variable allows you to specify a custom cache location for datasets converted into Arrow format. For instance:

```
$ export HF_DATASETS_CACHE="/path/to/your/custom/cache"
```

When you load a dataset, you also have the option to change where the data is cached. Change the `cache_dir` parameter to the path you want:
Expand Down
Loading