Revert "Make sharded checkpoints work in offline mode"

This reverts commit 3564c65786.
This commit is contained in:
Sylvain Gugger 2022-07-13 10:53:25 -04:00
parent 3564c65786
commit 0a21a48564
1 changed files with 2 additions and 3 deletions

View File

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