Commit 3564c657 authored by Sylvain Gugger's avatar Sylvain Gugger
Browse files

Make sharded checkpoints work in offline mode

parent 56e6487c
......@@ -552,8 +552,9 @@ def get_from_cache(
# the models might've been found if local_files_only=False
# Notify the user about that
if local_files_only:
raise FileNotFoundError(
"Cannot find the requested files in the cached path and outgoing traffic has been"
fname = url.split("/")[-1]
raise EntryNotFoundError(
f"Cannot find the requested file ({fname}) in the cached path and outgoing traffic has been"
" disabled. To enable model look-ups and downloads online, set 'local_files_only'"
" to False."
)
......
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