When I install and run natural language processing modules from like huggingspace, they often download large machine learning modules into:
C:\Users\User\.cache directories or similar directories on the drive in Windows.C:\
My C: drive is a SSD with limited space, I keep on running out of space on it.
I would like to change the python folder environment variable to a folder of my choice, as i use a development disk drive that is spacious and i got especially for this use case..cache
I could not find any way to change these directories, does anyone know how we can do this?
Cache directory
The default cache directory is
~/.cache/huggingface/datasets. Change the cache location by setting the shell environment variable,HF_DATASETS_CACHEto another directory:When you load a dataset, you also have the option to change where the data is cached. Change the
cache_dirparameter to the path you want:Similarly, you can change where a metric is cached with the
cache_dirparameter:from: https://huggingface.co/docs/datasets/cache