From e2810edc8f5c6f08b0f05a548b2761b35135b6de Mon Sep 17 00:00:00 2001 From: Dima Galat Date: Tue, 7 Jan 2020 11:47:25 +1100 Subject: [PATCH] removing redundant .flush --- src/transformers/file_utils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/transformers/file_utils.py b/src/transformers/file_utils.py index 8788c75acc..e74c895485 100644 --- a/src/transformers/file_utils.py +++ b/src/transformers/file_utils.py @@ -385,8 +385,6 @@ def get_from_cache( else: http_get(url, temp_file, proxies=proxies, resume_size=resume_size, user_agent=user_agent) - # we are copying the file before closing it, so flush to avoid truncation - temp_file.flush() logger.info("storing %s in cache at %s", url, cache_path) os.rename(temp_file.name, cache_path)