@@ -169,13 +169,22 @@ async def expand_workflow(self, wf, rerun=False):
169
169
await asyncio .sleep (1 )
170
170
if ii > 60 :
171
171
blocked = _list_blocked_tasks (graph_copy )
172
- get_runnable_tasks (graph_copy )
172
+ # get_runnable_tasks(graph_copy) # Uncomment to debug `get_runnable_tasks`
173
173
raise Exception (
174
174
"graph is not empty, but not able to get more tasks "
175
175
"- something may have gone wrong when retrieving the results "
176
- "of predecessor tasks caused by a file-system error or a bug "
177
- "in the internal workflow logic.\n \n Blocked tasks\n -------------\n "
178
- + "\n " .join (blocked )
176
+ "of predecessor tasks. This could be caused by a file-system "
177
+ "error or a bug in the internal workflow logic, but is likely "
178
+ "to be caused by the hash of an upstream node being unstable."
179
+ " \n \n Hash instability can be caused by an input of the node being "
180
+ "modified in place, or by psuedo-random ordering of `set` or "
181
+ "`frozenset` inputs (or nested attributes of inputs) in the hash "
182
+ "calculation. To ensure that sets are hashed consistently you can "
183
+ "you can try set the environment variable PYTHONHASHSEED=0 for "
184
+ "all processes, but it is best to try to identify where the set "
185
+ "objects are occurring and manually hash their sorted elements. "
186
+ "(or use list objects instead)"
187
+ "\n \n Blocked tasks\n -------------\n " + "\n " .join (blocked )
179
188
)
180
189
for task in tasks :
181
190
# grab inputs if needed
@@ -307,7 +316,7 @@ def _list_blocked_tasks(graph):
307
316
matching_name .append (
308
317
f"{ saved_tsk .name } ({ tsk_work_dir .name } )"
309
318
)
310
- blocking .append (pred , ", " .join (matching_name ))
319
+ blocking .append (( pred , ", " .join (matching_name ) ))
311
320
if blocking :
312
321
blocked .append (
313
322
f"\n { tsk .name } ({ tsk .checksum } ) is blocked by "
0 commit comments