Make pretrained models download path configurable
See original GitHub issueIs your feature request related to a problem? Please describe.
Directory where pretrained model is downloaded is hardcoded to
cache_dir = Path.joinpath(Path.home(), f'.cache/torch/NeMo/NeMo_{nemo.__version__}/{filename[:-5]}')
in https://github.com/NVIDIA/NeMo/blob/main/nemo/core/classes/common.py#L652.
So model download fails in environments where $HOME is not writeable.
Describe the solution you’d like
Provide option to specify path to download pretrained model. May be via environment variable or a parameter?
Describe alternatives you’ve considered
To unblock myself, I have currently created a change in my fork to specify download path via environment variable. https://github.com/jarivk/NeMo/commit/f2e1c57e400b71ddcb0c76499c0cd7f29893ba9c
Additional context
None
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Hmm true it’s burried in documentation. You can use NEMO_CACHE_DIR=“SOME PATH” in your environment env (maybe bashrc or similar)
Hello! I understand that we can now change the location of default cache directory where the pre-trained models are downloaded to, is that correct? I can’t find how to do that in the documentation, could you help me with that?