Skip to content

Commit 80e9f76

Browse files
authored
Fix typo in warning message (#27055)
* Fix typo in warning message The path of `default_cache_path` is hf_cache_home/hub. There is no directory named transformers under hf_cache_home * Fix a typo in comment * Update the version number v4.22.0 is the earlist version that contains those changes in PR #18492
1 parent 7293fdc commit 80e9f76

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/transformers/utils/hub.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ def is_offline_mode():
104104
and "TRANSFORMERS_CACHE" not in os.environ
105105
):
106106
logger.warning(
107-
"In Transformers v4.0.0, the default path to cache downloaded models changed from"
108-
" '~/.cache/torch/transformers' to '~/.cache/huggingface/transformers'. Since you don't seem to have"
107+
"In Transformers v4.22.0, the default path to cache downloaded models changed from"
108+
" '~/.cache/torch/transformers' to '~/.cache/huggingface/hub'. Since you don't seem to have"
109109
" overridden and '~/.cache/torch/transformers' is a directory that exists, we're moving it to"
110-
" '~/.cache/huggingface/transformers' to avoid redownloading models you have already in the cache. You should"
110+
" '~/.cache/huggingface/hub' to avoid redownloading models you have already in the cache. You should"
111111
" only see this message once."
112112
)
113113
shutil.move(old_default_cache_path, constants.HF_HUB_CACHE)
@@ -1126,7 +1126,7 @@ def move_cache(cache_dir=None, new_cache_dir=None, token=None):
11261126
if new_cache_dir is None:
11271127
new_cache_dir = TRANSFORMERS_CACHE
11281128
if cache_dir is None:
1129-
# Migrate from old cache in .cache/huggingface/hub
1129+
# Migrate from old cache in .cache/huggingface/transformers
11301130
old_cache = Path(TRANSFORMERS_CACHE).parent / "transformers"
11311131
if os.path.isdir(str(old_cache)):
11321132
cache_dir = str(old_cache)

0 commit comments

Comments
 (0)