Unverified Commit 582d104b authored by Zach Mueller's avatar Zach Mueller Committed by GitHub
Browse files

Fix windows err with checkpoint race conditions (#28637)

Fix windows err
parent c475eca9
......@@ -2415,6 +2415,8 @@ class Trainer:
os.rename(staging_output_dir, output_dir)
# Ensure rename completed in cases where os.rename is not atomic
# And can only happen on non-windows based systems
if os.name != "nt":
fd = os.open(output_dir, os.O_RDONLY)
os.fsync(fd)
os.close(fd)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment