-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use child dir for branch taken (#6120)
We reuse the same data directory for the branch node and the branch taken (child). This change adds an additional set of directories to decouple these. It makes sure to copy the child output up to the branch node output like we do in subworkflow Example ``` from dataclasses import dataclass from flytekit import conditional, task, workflow @DataClass class MyData: foo: str @workflow def root_wf(data: MyData) -> str: return sub_wf(data=data) @workflow def sub_wf(data: MyData) -> str: check = always_true() return conditional("decision").if_(check.is_true()).then(conditional_wf(data=data)).else_().fail("not done") @task def always_true() -> bool: return True @workflow def conditional_wf(data: MyData) -> str: return done(data) @task def done(data: MyData) -> str: return f"done ({data.foo})" ``` - [x] Add unittests - [x] Run locally using sandbox and verify behavior with working example. Inspect paths Signed-off-by: Andrew Dye <[email protected]>
- Loading branch information
1 parent
27b2f3a
commit 4ac3019
Showing
2 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters