Skip to content
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

Change default cache path #8734

Merged
merged 3 commits into from
Nov 23, 2020
Merged

Change default cache path #8734

merged 3 commits into from
Nov 23, 2020

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Nov 23, 2020

What does this PR do?

In Datasets, the default cache path ends up in ~/.cache/huggingface/datasets, controlled by the environment variable HF_HOME. This PR uses the same env variable for the default cache path.
To avoid breaking changes:

  • it still honors old environment variable names, if set
  • if none is set, it moves the cache folder from the old location to the new one with a warning.

@sgugger sgugger requested a review from LysandreJik November 23, 2020 18:36
Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

docs/source/installation.md Outdated Show resolved Hide resolved
docs/source/installation.md Outdated Show resolved Hide resolved
Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
@sgugger sgugger merged commit 9000242 into master Nov 23, 2020
@sgugger sgugger deleted the cache_path branch November 23, 2020 18:56
LysandreJik added a commit that referenced this pull request Nov 23, 2020
* Change default cache path

* Document changes

* Apply suggestions from code review

Co-authored-by: Lysandre Debut <lysandre@huggingface.co>

Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants