Skip to content

Commit

Permalink
Do not upload temporary directory to artifacts (#841) (#849)
Browse files Browse the repository at this point in the history
  • Loading branch information
eu9ene authored Sep 16, 2024
1 parent 34b9c1d commit d7235e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pipeline/alignments/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def run(
src = os.environ["SRC"]
trg = os.environ["TRG"]

tmp_dir = os.path.join(os.path.dirname(output_path), "tmp")
tmp_dir = os.path.join(os.path.dirname(output_path), "tmp_aln")
os.makedirs(tmp_dir, exist_ok=True)

corpus_src = decompress(corpus_src)
Expand Down Expand Up @@ -100,6 +100,9 @@ def run(
remapped_aln += ".zst"
shutil.move(remapped_aln, output_path)

# Remove temporary directory to prevent uploading to artifacts
shutil.rmtree(tmp_dir)


def decompress(file_path: str):
if file_path.endswith(".zst"):
Expand Down
2 changes: 1 addition & 1 deletion pipeline/alignments/generate-shortlist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi
cd "$(dirname "${0}")"

mkdir -p "${output_dir}"
dir="${output_dir}/tmp"
dir="${output_dir}/tmp_shortlist"
mkdir -p "${dir}"

corpus_src="${corpus_prefix}.${SRC}.zst"
Expand Down

0 comments on commit d7235e0

Please sign in to comment.