Skip to content

Commit

Permalink
Fixed copying result files
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Nov 23, 2024
1 parent ea14f51 commit 39256a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/slurm/arrayexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,10 @@ def get_run_result(output_dir, tempdir, run, result_files_patterns):
content = log_source.read()
file.write(content)

if os.path.exists(os.path.join(tempdir, "output")):
if os.path.exists(tempdir):
os.makedirs(output_dir, exist_ok=True)
for result_files_pattern in result_files_patterns:
for file_name in glob.glob(f"{tempdir}/output/{result_files_pattern}"):
for file_name in glob.glob(f"{tempdir}/{result_files_pattern}"):
if os.path.isfile(file_name):
shutil.copy(file_name, output_dir)

Expand Down

0 comments on commit 39256a0

Please sign in to comment.