limited-sundown-57683
07/13/2022, 11:32 AM@dynamic
workflow, is there a way to define dependencies between tasks without relying on their respective outputs? i.e, we would like to run task2()
after task1()
even though the latter does not output anything.
In a classic @workflow
, we could rely on create_node()
+ >>
but can't figure out the equivalent for @dynamic
freezing-airport-6809
freezing-airport-6809
limited-sundown-57683
07/13/2022, 2:07 PMCannot use explicit run to call Flyte entities workflows.test.task1
ambitious-spoon-47823
07/13/2022, 2:17 PMambitious-spoon-47823
07/13/2022, 2:18 PM@task
def task1():
print("1")
@task
def task2():
print("2")
@task
def task3():
print("3")
@dynamic
def dynamic_wf() -> str:
node_1 = create_node(
task1
)
node_2 = create_node(
task2
)
node_3 = create_node(
task3
)
node_3 >> node_2
node_1 >> node_2
return "Done"
@workflow
def wf2() -> str:
return dynamic_wf()
ambitious-spoon-47823
07/13/2022, 2:33 PMpyflyte run file.py wf2
ambitious-spoon-47823
07/13/2022, 2:33 PMfreezing-airport-6809
ambitious-spoon-47823
07/13/2022, 3:06 PMhigh-accountant-32689
07/13/2022, 3:07 PMhigh-accountant-32689
07/13/2022, 3:43 PMcreate_node
in @dynamic
in local executions.
This works in a remote setting.ambitious-spoon-47823
07/13/2022, 3:51 PMhigh-accountant-32689
07/13/2022, 3:52 PMfreezing-airport-6809
freezing-airport-6809
high-accountant-32689
07/13/2022, 5:32 PMambitious-spoon-47823
07/13/2022, 5:42 PMfreezing-airport-6809