-
Notifications
You must be signed in to change notification settings - Fork 79
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
Set custom huggingface-hub cache #3075
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm !
logging.debug(f"datasets data cache set to: {datasets.config.HF_DATASETS_CACHE}") | ||
datasets.config.DOWNLOADED_DATASETS_PATH = ( | ||
datasets.config.HF_DATASETS_CACHE / datasets.config.DOWNLOADED_DATASETS_DIR | ||
) | ||
datasets.config.EXTRACTED_DATASETS_PATH = ( | ||
datasets.config.HF_DATASETS_CACHE / datasets.config.EXTRACTED_DATASETS_DIR | ||
) | ||
huggingface_hub.constants.HF_HUB_CACHE = cache_subdirectory / "hub" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @Wauplin please keep this working in the future ^^'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance you could use the env variable instead of monkeypatching?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we handle the cache at runtime so no
(e.g. using temporary directories)
Set custom
huggingface-hub
cache.Fix #3074.