-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix][Graph] Write compiled graph to tempfile first (#392)
When a process is running save_compiled_graph(path) and writing the CompiledGraph zipfile to the disk, another process may think that the CompiledGraph file can be read since os.path.isfile(path) evaluates to true. This change writes the file to a temporary file first to avoid this race condition.
- Loading branch information
Showing
1 changed file
with
49 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters