Commit 0a21a485 authored by Sylvain Gugger's avatar Sylvain Gugger
Browse files

Revert "Make sharded checkpoints work in offline mode"

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