Unverified Commit 50949fab authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Properly move cache when it is not in default path (#18563)

parent 6936e7c4
......@@ -1070,6 +1070,10 @@ if cache_version < 1:
"`transformers.utils.move_cache()`."
)
try:
if TRANSFORMERS_CACHE != default_cache_path:
# Users set some env variable to customize cache storage
move_cache(TRANSFORMERS_CACHE, TRANSFORMERS_CACHE)
else:
move_cache()
except Exception as e:
trace = "\n".join(traceback.format_tb(e.__traceback__))
......
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