"docs/vscode:/vscode.git/clone" did not exist on "5dfd407b37ac683dc91637e9913b0ae9205d2acd"
Unverified Commit 3b0cecb6 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Don't warn of move if cache is empty (#19109)

parent 6be338f1
......@@ -1104,8 +1104,9 @@ else:
with open(cache_version_file) as f:
cache_version = int(f.read())
cache_is_not_empty = os.path.isdir(TRANSFORMERS_CACHE) and len(os.listdir(TRANSFORMERS_CACHE)) > 0
if cache_version < 1:
if cache_version < 1 and cache_is_not_empty:
if is_offline_mode():
logger.warning(
"You are offline and the cache for model files in Transformers v4.22.0 has been updated while your local "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment