Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(utility): fix the FileExistsError when using cache with multiprocess #1113

Merged
merged 1 commit into from
Nov 19, 2021

Conversation

Lee-000
Copy link
Collaborator

@Lee-000 Lee-000 commented Nov 19, 2021

When using cache with multiprocess, the result will not necessarily stay
true after asserting os.path.exists(cache_path) == True.
Add exist_ok when calling os.makedirs to fix this problem.

@Lee-000 Lee-000 requested a review from linjiX as a code owner November 19, 2021 09:08
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1480298828

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 86.557%

Totals Coverage Status
Change from base Build 1480273692: -0.002%
Covered Lines: 7598
Relevant Lines: 8778

💛 - Coveralls

When using cache with multiprocess, the result will not necessarily stay
true after asserting `os.path.exists(cache_path) == True`.
Add `exist_ok` when calling `os.makedirs` to fix this problem.

PR Closed: Graviti-AI#1113
@Lee-000 Lee-000 merged commit 5d5cf30 into Graviti-AI:main Nov 19, 2021
@Lee-000 Lee-000 deleted the add_exist_ok branch November 19, 2021 09:48
linjiX pushed a commit that referenced this pull request Dec 1, 2021
When using cache with multiprocess, the result will not necessarily stay
true after asserting `os.path.exists(cache_path) == True`.
Add `exist_ok` when calling `os.makedirs` to fix this problem.

PR Closed: #1113
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.

3 participants