• Sean Bell's avatar
    Fix possible race condition in model saving. · b62314c6
    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
Name
Last commit
Last update
..
core Loading commit data...
datasets Loading commit data...
modeling Loading commit data...
ops Loading commit data...
roi_data Loading commit data...
tests Loading commit data...
utils Loading commit data...
__init__.py Loading commit data...