We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e20495b commit eed6b4cCopy full SHA for eed6b4c
smdebug/core/access_layer/file.py
@@ -50,6 +50,11 @@ def close(self):
50
"""Close the file and move it from /tmp to a permanent directory."""
51
self._accessor.close()
52
if self.mode in WRITE_MODES:
53
+ if not os.path.exists(self.temp_path):
54
+ self.logger.info(
55
+ f"Sagemaker-Debugger: Skipping close of file:{self.temp_path} as file doesn't exist"
56
+ )
57
+ return
58
shutil.move(self.temp_path, self.path)
59
self.logger.debug(
60
f"Sagemaker-Debugger: Wrote {os.path.getsize(self.path)} bytes to file {self.path}"
0 commit comments