mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 03:01:07 +06:00
Fix local_files_only for TF (#6091)
This commit is contained in:
parent
9e80f972fb
commit
85d2d8c920
@ -847,7 +847,7 @@ def get_from_cache(
|
|||||||
else:
|
else:
|
||||||
matching_files = [
|
matching_files = [
|
||||||
file
|
file
|
||||||
for file in fnmatch.filter(os.listdir(cache_dir), filename + ".*")
|
for file in fnmatch.filter(os.listdir(cache_dir), filename.split(".")[0] + ".*")
|
||||||
if not file.endswith(".json") and not file.endswith(".lock")
|
if not file.endswith(".json") and not file.endswith(".lock")
|
||||||
]
|
]
|
||||||
if len(matching_files) > 0:
|
if len(matching_files) > 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user