Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
cpelley committed Oct 3, 2024
1 parent d36c9d4 commit 46e6183
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions dagrunner/execute_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ def plugin_executor(
arg for arg in args if arg is not None
] # support plugins that have no return value
if call is None:
raise ValueError("call is a required argument")
raise ValueError(
f"call is a required argument\nnode_properties: {node_properties}"
)
if verbose:
print(f"args: {args}")
print(f"call: {call}")
Expand Down Expand Up @@ -162,7 +164,7 @@ def plugin_executor(
else:
raise ValueError(
f"expecting 1, 2 or 3 values to unpack for {callable_obj}, "
f"got {len(call)}"
f"got {len(call)}\nnode_properties: {node_properties}"
)
callable_kwargs_init = (
{} if callable_kwargs_init is None else callable_kwargs_init
Expand All @@ -175,7 +177,7 @@ def plugin_executor(
else:
raise ValueError(
f"expecting 1 or 2 values to unpack for {callable_obj}, got "
f"{len(call)}"
f"{len(call)}\nnode_properties: {node_properties}"
)
callable_kwargs = {} if callable_kwargs is None else callable_kwargs

Expand All @@ -191,7 +193,10 @@ def plugin_executor(
try:
callable_obj = callable_obj(**callable_kwargs_init)
except Exception as err:
msg = f"Failed to initialise {obj_name} with {callable_kwargs_init}"
msg = (
f"Failed to initialise {obj_name} with {callable_kwargs_init}"
f"\nnode_properties: {node_properties}"
)
raise RuntimeError(msg) from err
call_msg = f"(**{callable_kwargs_init})"

Expand All @@ -210,7 +215,10 @@ def plugin_executor(
try:
res = callable_obj(*args, **callable_kwargs)
except Exception as err:
msg = f"Failed to execute {obj_name} with {args}, {callable_kwargs}"
msg = (
f"Failed to execute {obj_name} with {args}, {callable_kwargs}"
f"\nnode_properties: {node_properties}"
)
raise RuntimeError(msg) from err
msg = f"{str(timer)}; {msg}; {mem.max()}"
logging.info(msg)
Expand Down

0 comments on commit 46e6183

Please sign in to comment.