如何查看SentenceTransformer、torch等包的缓存安装位置

打开iterm,python

SentenceTransformer默认:

1 >>> import os
2 >>> print(os.getenv('SENTENCE_TRANSFORMERS_HOME'))

torch默认:

1 >>> from torch.hub import _get_torch_home
2 >>> torch_cache_home = _get_torch_home()
3 >>> print(torch_cache_home)

 

posted @ 2024-03-25 16:34  Lovaer  阅读(201)  评论(0编辑  收藏  举报