Skip to content

[Fix][Graph] Write compiled graph to tempfile first#392

Merged
yaoyaoding merged 2 commits intohidet-org:mainfrom
destefy:fix-save-compiled-graph
Dec 12, 2023
Merged

[Fix][Graph] Write compiled graph to tempfile first#392
yaoyaoding merged 2 commits intohidet-org:mainfrom
destefy:fix-save-compiled-graph

Conversation

@destefy
Copy link
Copy Markdown
Contributor

@destefy destefy commented Dec 12, 2023

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.

@yaoyaoding
Copy link
Copy Markdown
Member

Thanks @destefy ! It looks good to me.

@yaoyaoding yaoyaoding merged commit f3fa023 into hidet-org:main Dec 12, 2023
@destefy destefy deleted the fix-save-compiled-graph branch December 14, 2023 21:39
vadiklyutiy added a commit that referenced this pull request Dec 19, 2024
- sync `requirement.txt` with requirement in `setup.py`
- add extras_require
- requirements is torch >= 2.3.0
vadiklyutiy added a commit that referenced this pull request Dec 20, 2024
- sync `requirement.txt` with requirement in `setup.py`
- add extras_require
- requirements is torch >= 2.3.0
vadiklyutiy added a commit that referenced this pull request Dec 24, 2024
- sync `requirement.txt` with requirement in `setup.py`
- add extras_require
- requirements is torch >= 2.3.0
vadiklyutiy added a commit that referenced this pull request Dec 26, 2024
- sync `requirement.txt` with requirement in `setup.py`
- add extras_require
- requirements is torch >= 2.3.0
vadiklyutiy added a commit that referenced this pull request Dec 26, 2024
- sync `requirement.txt` with requirement in `setup.py` 
- add extras_require
- requirements is torch >= 2.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants