Skip to content

Commit

Permalink
simplify pathing to obey push dirs for node autoinsertion (#844)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdngo authored Feb 28, 2024
1 parent 9d0961f commit 5897249
Show file tree
Hide file tree
Showing 2 changed files with 674 additions and 607 deletions.
5 changes: 1 addition & 4 deletions hammer/flowgraph/flowgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def insert_auxiliary_actions(edge_list: dict[Node, list[Node]]) -> dict[Node, li
aux_node = Node(
aux_action,
parent.tool,
os.path.join(os.path.dirname(parent.pull_dir), f"{aux_action}-dir"),
parent.push_dir,
child.pull_dir,
parent.required_outputs,
[f"{aux_action}-out.json"],
Expand All @@ -211,9 +211,6 @@ def insert_auxiliary_actions(edge_list: dict[Node, list[Node]]) -> dict[Node, li
edge_list_copy = edge_list.copy()
for parent_idx, child_idx, aux_node in changes:
parent, children = list(edge_list_copy.items())[parent_idx]
parent.push_dir = os.path.join(
os.path.dirname(parent.pull_dir),
f"{aux_node.action}-dir")

child = children[child_idx]
child.required_inputs = aux_node.required_outputs
Expand Down
Loading

0 comments on commit 5897249

Please sign in to comment.