How do I customize .cache/huggingface
Is it possible to set the location for huggingface cache?  I use a disk specifically for datasets and model backups. Or is it something I have to solve with Unix plumbing (soft links etc)?
2022-10-11T17:47:42Z
There’s a couple different ways to customize the caching directories! You can set acache for datasetswith theHF_DATASETS_CACHEenvironment variable, or withcache_diras a parameter when you load a dataset. For models,there’s a similar environment variable.This is a higher-level doc about how caching across the HF ecosystem works, which may or may not be interesting to you.Hope this helps!
2022-11-01T15:36:22Z
Hello,I am fighting with the cache dir location on Win10Pro and I cannot find a solution to change it.I have tried the following code to force the datasets and models elements download on my E drive and it fails. Surprisingly when I use the same location path in the cache_dir parameter for loading the datasets, it works fine.os.environ[‘HF_HOME’] = ‘E:\01- NLP Projects\02- Hugging Face\.cache’os.environ[‘HUGGINGFACE_HUB_CACHE’] = ‘E:\01- NLP Projects\02- Hugging Face\.cache’os.environ[‘TRANSFORMERS_CACHE’] = ‘E:\01- NLP Projects\02- Hugging Face\.cache’os.environ[‘HF_DATASETS_CACHE’] = ‘E:\01- NLP Projects\02- Hugging Face\.cache’Thanks for your help and feedback.Best regardsJerome