Fix local_files_only for TF (#6091)

This commit is contained in:
Lysandre Debut 2020-10-01 11:06:02 +02:00 committed by GitHub
parent 9e80f972fb
commit 85d2d8c920
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -847,7 +847,7 @@ def get_from_cache(
else:
matching_files = [
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 len(matching_files) > 0: