Skip to content
New issue

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

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

Already on GitHub? # to your account

Prevent FileNotFoundError During Parallel Inference by Adding Try-Except Block #2

Merged

Conversation

juliocesar-io
Copy link
Owner

@juliocesar-io juliocesar-io commented Sep 20, 2024

Description:

When running inference in parallel using multiple models that share a common run path, the fasta file may be removed by one process while another is still accessing it. This leads to a FileNotFoundError.

To address this issue, this pull request adds a try-except block around the file removal operation. This ensures that if the file has already been removed by another process, the exception is caught gracefully, allowing the inference to continue without interruption.

Changes:

  • Added a try-except block when attempting to remove the fasta file during inference.

Testing:

  • Verified that running inference in parallel no longer results in a FileNotFoundError.
  • Ensured that the try-except block does not interfere with normal file removal when the file exists.

@juliocesar-io juliocesar-io self-assigned this Sep 20, 2024
@juliocesar-io juliocesar-io added the bug Something isn't working label Sep 20, 2024
@juliocesar-io juliocesar-io merged commit fbc8c63 into fastfold-server-optimizations Sep 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant