Skip to content

Commit 4ab9408

Browse files
committed
added assertion to help debug slurm
1 parent 8281c59 commit 4ab9408

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pydra/engine/workers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ def _prepare_runscripts(self, task, interpreter="/bin/sh", rerun=False):
253253
ind = None
254254
uid = task.uid
255255
else:
256+
assert isinstance(task, tuple), f"Expecting a task or a tuple, not {task!r}"
257+
assert len(task) == 2, f"Expecting a tuple of length 2, not {task!r}"
256258
ind = task[0]
257259
cache_dir = task[-1].cache_dir
258260
uid = f"{task[-1].uid}_{ind}"

0 commit comments

Comments
 (0)