-
Sean Bell authored
Summary: When saving models, it can appear as available for loading before saving has finished. This can cause race conditions, particularly on network file systems. This changes saving code to write to a temporary filename in the same directory and then atomically rename to the target filename. This is a common technique that relies on the atomicity of `os.rename`. Reviewed By: ashwinb, samialsheikh Differential Revision: D14495989 fbshipit-source-id: 2e44dd8e747331b319ef46132ddeff604618a5dd
b62314c6