From 9a1d6c4bb13061cc28501374ab055f437ca5b51a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Jun 2021 15:32:31 +0800 Subject: [PATCH] add file.flush() --- mindspore/explainer/_image_classification_runner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mindspore/explainer/_image_classification_runner.py b/mindspore/explainer/_image_classification_runner.py index 6258a3b124d..704362145f8 100644 --- a/mindspore/explainer/_image_classification_runner.py +++ b/mindspore/explainer/_image_classification_runner.py @@ -998,6 +998,7 @@ class ImageClassificationRunner(_Verifier): log.error(f"Failed to save manifest as {save_path}!") raise finally: + file.flush() os.close(fd) os.chmod(save_path, self._FILE_MODE)