Skip to content

Commit 048c0a1

Browse files
committed
More touch ups to error messages
1 parent b54166e commit 048c0a1

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

pydra/engine/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ def _check_for_hash_changes(self):
909909
f"- the {field.type} object passed to '{changed}' field appears to "
910910
f"have an unstable hash. The {field.type}.__bytes_repr__() method "
911911
"can be implemented to provide stable hashes for this type. "
912-
"See pydra/utils.hash.py for examples.\n"
912+
"See pydra/utils/hash.py for examples.\n"
913913
)
914914
if hash_changes:
915915
raise RuntimeError(

pydra/engine/submitter.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ async def expand_workflow(self, wf, rerun=False):
186186
}
187187
graph_checksums = dict(wf.inputs._graph_checksums)
188188

189+
hashes_have_changed = False
189190
for task, waiting_on in outstanding.items():
190191
if not waiting_on:
191192
continue
@@ -197,13 +198,25 @@ async def expand_workflow(self, wf, rerun=False):
197198
f"Current values and hashes: {pred.inputs}, "
198199
f"{pred.inputs._hashes}\n"
199200
)
201+
hashes_have_changed = True
200202
elif pred not in outstanding:
201203
msg += (
202-
f" - undiagnosed issues in '{pred.name}' node "
203-
"(potentially related to the file-system)"
204+
f" - undiagnosed issues in '{pred.name}' node, "
205+
"potentially related to file-system access issues "
204206
)
205207
msg += "\n"
206-
msg += "Set loglevel to 'debug' in order to track hash changes"
208+
if hashes_have_changed:
209+
msg += (
210+
"Set loglevel to 'debug' in order to track hash changes "
211+
"throughout the execution of the workflow.\n\n "
212+
"These issues may have been caused by `bytes_repr()` methods "
213+
"that don't return stable hash values for specific object "
214+
"types across multiple processes (see bytes_repr() "
215+
'"singledispatch "function in pydra/utils/hash.py).'
216+
"You may need to implement a specific `bytes_repr()` "
217+
'"singledispatch overload"s or `__bytes_repr__()` '
218+
"dunder methods to handle one or more types in "
219+
)
207220
raise RuntimeError(msg)
208221
for task in tasks:
209222
# grab inputs if needed

0 commit comments

Comments
 (0)