Skip to content

Commit

Permalink
clean up log suffix creation
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoLegends committed Nov 4, 2024
1 parent 39fd9e6 commit cbc0ed4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def init_worker(self, task):
array_task_id = self.get_task_id(None)

# keep backwards compatibility: only change output file name for multi-SLURM-task jobs
log_suffix = array_task_id if slurm_num_tasks <= 1 else f"{array_task_id}.{slurm_task_id}"
log_suffix = str(array_task_id) + (f".{slurm_task_id}" if slurm_num_tasks > 1 else "")
logpath = os.path.relpath(task.path(gs.JOB_LOG, log_suffix))
if os.path.isfile(logpath):
os.unlink(logpath)
Expand Down

0 comments on commit cbc0ed4

Please sign in to comment.