Skip to content

Commit

Permalink
added tmp file remove check when running in pararell
Browse files Browse the repository at this point in the history
  • Loading branch information
juliocesar-io committed Sep 27, 2024
1 parent b5d185b commit ab90e69
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions run_pretrained_openfold.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,12 @@ def precompute_alignments(tags, seqs, alignment_dir, args):
logger.info(
f"Using precomputed alignments for {tag} at {alignment_dir}..."
)

# Remove temporary FASTA file
os.remove(tmp_fasta_path)


try:
# Remove temporary FASTA file
os.remove(tmp_fasta_path)
except Exception as e:
logger.warning(f"Error removing temporary fasta file: {e}, you may be running parallel inference in a shared filesystem")

def round_up_seqlen(seqlen):
return int(math.ceil(seqlen / TRACING_INTERVAL)) * TRACING_INTERVAL
Expand Down

0 comments on commit ab90e69

Please # to comment.