When I download models through Torch Hub, models are automatically downloaded in /home/me/.cache/torch
.
How can I modify this behavior ?
From official documentation, there is several ways to modify this path.
In priority order :
Calling hub.set_dir()
$TORCH_HOME/hub, if environment variable TORCH_HOME is set.
$XDG_CACHE_HOME/torch/hub, if environment variable XDG_CACHE_HOME is set.
~/.cache/torch/hub
So I just had to do :
export TORCH_HUB=/my/path/
TORCH_HUB
appear to be deprecated, use TORCH_HOME
instead
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With