Make sharded checkpoints work in offline mode
This commit is contained in:
parent
56e6487c40
commit
3564c65786
|
@ -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."
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue