Skip to content

Commit

Permalink
Not making default card a special case in output
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudw committed Sep 26, 2024
1 parent 9c85764 commit 1cdc8d9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions metaflow/plugins/aip/aip.py
Original file line number Diff line number Diff line change
Expand Up @@ -1476,14 +1476,11 @@ def _create_metaflow_step_op(
None if node.name == "start" else {"flow_parameters_json": "None"}
)

card_decos = [deco for deco in node.decorators if deco.name == "card"]
file_outputs: Dict[str, str] = {
"card": "/tmp/outputs/cards/card.html",
f"card{i}": f"/tmp/outputs/cards/card{i}.html"
for i in range(len(card_decos))
}
i = 1 # the default card would be i == 0
for deco in node.decorators:
if deco.name == "card":
file_outputs[f"card{i}"] = f"/tmp/outputs/cards/card{i}.html"
i = i + 1

if node.type == "foreach":
file_outputs["foreach_splits"] = "/tmp/outputs/foreach_splits/data"
Expand Down

0 comments on commit 1cdc8d9

Please sign in to comment.